View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default [EASY] I'll become mad ' & "" in variables

wrote:
Simple line:
Cells(1, 1) =
"=IF('[1.xlsx]variable'!A1='[2.xlsx]variable'!A1,""ok"",""no"")"
How can I substitute the "variable" text with a real variable?


Cells(1, 1) = _
"=IF('[1.xlsx]" & variable & "'!A1='[2.xlsx]" & variable & _
"'!A1,""ok"",""no"")"