View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Quote Marks Through VBA

You did it right if the ref cell does have maturity in it. Maybe leading or
trailing space?
=IF(TRIM(F1)="maturity",1,2)

--
Don Guillett
SalesAid Software

wrote in message
oups.com...
Very simple question, but I can't figure it out:

I want to make a formula in a cell through VBA, but I want the formula
to have a word in it (which needs to be in quotes). That is, I want
the formula to read:

=IF(Sheet2!G6="Maturity",1,2)

How can I get the Maturity part surrounded by quotes?

Thanks!

Brett