Thread: Text in formula
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Text in formula

try this

Range("A1").Formula = "=Match(" & ccy & ", A:A, 0)"

--


Gary Keramidas
Excel 2003


"diepvic" wrote in message
...
I need to assign a formula for cell A1 as below:
Range("A1") .formula = "=Match(""USD"", A:A, 0)"

However, the lookup_value (USD) is a variable, named Ccy (currency). How
should I change the code above to replace the USD with the variable Ccy?

Many thanks!