Thread: Wild Cards
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
KarenF KarenF is offline
external usenet poster
 
Posts: 49
Default Wild Cards

Hello all,

I'm trying to use a wild card to look up a value in column B to populate
column P. All I'm trying to do is a "contains" ABC.

The same statement without the wild card works.

Range("P2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-14]=""ABC"",True,False)"

But as soon as I introduce the wild card, everything comes up false.

Range("P2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-14]=""=*ABC*"",True,False)"

I stole the wild card argument from an auto-filter statement, because I
didn't know what else to do. (I'm not a programmer.)

I suspect it's the quotes I have wrong, but I've tried every possible
combination and still can't get it to work. A simple fix, I hope?

Karen F