Nested if with "wild card"

M

mldancing

Would really appreciate it if you can help with the following nested if
example:

Example:

A1 B1
Large 2009 100
Medium 2009 200
Medium 2008 500
Large 2008 300
Other 2009 400

I want to set up a nested if formula to pick up the value in B1 if there is
the word
"Large" in A1 or if there's "Medium" in A1, else enter zero.

I was going with this but it didn't work:
=if(or(A1="Large*",A1="Medium*"),B1,0)

Can someone help? Thank you.
 
M

mldancing

Thank you for you reply. In this example this formula would work.

Is it possible to use a wild card? 'cause there could be other combination
of description
such as Extra Large or Medium Small.

Thank you.
 
B

barry houdini

You can't use a wildcard with comparison operators like =, try usin
COUNTIF

=IF(SUM(COUNTIF(A1,{"*large*","*medium*"})),B1,"")

regards, barr
 
D

Dave Peterson

Bill's formula only looks at the first 4 characters in the cell (=left(a1,4)).
So you don't need a wild card.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top