Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

can you use wildcards in an if formula excel 2003

Posted on 2011-03-06
8
Medium Priority
?
365 Views
Last Modified: 2012-08-13
I would like to use the wildcard * in an IF formula.   If cell A contains the string IND I would like it to populate in cell D, if cell A contains MV I would like it to populate column D, if neither is found in Cell A then I want the cells to be blank.  Are wildcards allowed in IF statements?  If so, what is the syntax and cell formatting to make the attach file work.

 expWildcard.xls
0
Comment
Question by:mossyback
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 24

Expert Comment

by:jimyX
ID: 35046751
You can use find instead, see the attachment:

expWildcard-updated.xls
0
 
LVL 24

Accepted Solution

by:
jimyX earned 1000 total points
ID: 35046759
Better use search because it is not case sensitive.
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35046763
Do you just want the relevant number or the whole cell contents, e.g. what should be in C13 and D13?

If you want the whole cell contents in both then try this formula in C2 copied down and across and format to wrap text

=IF(ISNUMBER(SEARCH(C$1,$A2)),$A2,"")

see attached

If you want to extract the number from each so that C13 is 1 and D13 is 2 then that's another formula, how long will the numbers be...only single digits or longer?

see attached for that initial option....

regards, barry
26866774.xls
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 50

Expert Comment

by:barry houdini
ID: 35046774
To extract just the numbers change to this formula

=IF(SEARCH(C$1,$A2&C$1)<LEN($A2),MID($A2,SEARCH(C$1,$A2)-2,1)+0,"")

regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35046782
This attachment illustrates that last formula......

barry
26866774v2.xls
0
 

Author Closing Comment

by:mossyback
ID: 35046844
Thanks JimyX.  That did the trick!
0
 

Author Comment

by:mossyback
ID: 35046853
barryhoudini  - Your solution is also interesting.  I might be able to use it on something else.  Good stuff!
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35047044
In this formula

=IF(ISERROR(IF(FIND("IND",A3)>0,A3,"")),"",IF(FIND("IND",A3)>0,A3,""))

The IF functions are really redundant because either the value "IND" is found in A3....in which case the IF is TRUE.....or it isn't in which case the IF is never evaluated because FIND returns an error, so you have an IF function in whch the FALSE can never be returned. My suggested formula simply checks whether SEARCH (or FIND) returns a number or not, which is all you need.

regards, barry
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question