Wildcard in an If statement

Amileaux

Board Regular
Joined
Nov 3, 2002
Messages
110
Does a wildcard (* or ?) work in an if statement? For example in A1 I have the word "nextlevel" (wo the ""). In A2 I have: If(A1="nex*","Ok","No"). I have even tried If(A1="=nex*","ok","no"). In both instances I get "no", when I should be getting "ok". I figured out a work around using the left function - but still think the if statement should have worked.

A related question, when would I use "nex*" versus "=nex*"?

Thank you. Marie
 
Col A Col B Col C
Row 1 12/31/12 Online Payment3009954333 To MrExcel 12/31 $100.00
Row 2 12/22/12 Online Payment3009912121 To Apple Store 12/22 $200.00

My thought was to write a formul in Col D, Row 1 that says: =If(B1="*MrExcel*", +C1,0) where the * is a wildcard. When I do that,
You can do it this way...

=IF(COUNTIF(B1,"*MrExcel*"),C1,0)
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
It may be easier to understand my dilemma if you consider this look at the original spreadsheet:

Column A<o:p></o:p>Column B<o:p></o:p>Column C<o:p></o:p>
Row 1<o:p></o:p>1/11/2012<o:p></o:p>Online Paymentxxx54333 To MrExcel 01/11<o:p></o:p> $ 100.00 <o:p></o:p>
Row 2<o:p></o:p>1/12/2012<o:p></o:p>Online Paymentxxx11221 To Apple 01/12<o:p></o:p> $ 50.00 <o:p></o:p>

<tbody>
</tbody>

E2: mrxecel
E3: apple
Etc...

F2, just enter and copy down:

=SUMIF($B$2:$B$4,"*"&E2&"*",$C$2:$C$4)

Also possible...

D2, just enter & copy down:

=LOOKUP(9.99999999999999E+307,SEARCH(PayeeList,C2),PayeeList)
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top