formula problem inside a macro

L

larrypatel

'E3' has a value like, day19 in he active sheet
C5 has a number in sheet,day19.
A1 in active sheet =INDIRECT("'" & $E$3 & "'!C"&ROW(5:5)).
This reference works good normally. But when put inside a macro,
gives a runtime error '1004'.
Please help.
 
J

JE McGimpsey

Could be a number of things, but one likely problem is that quotation
marks (") inside quoted strings need to be doubled, e.g.:

=INDIRECT(""'"" & $E$3 & ""'!C""&ROW(5:5))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top