vanhunk
08-24-2012, 03:58 AM
Good day to you,
I need to have a macro write the following formula into a cell, but with all the inverted commas (") it does not work and I can't get it to work. Where do I need to insert what for it to work? Please help.
=IF(OR($N$43="",$N$44="",$N$45=""),"",INDIRECT(" '" & $N$43 & "[" & $N$44 & "]" & $N$45 & "'!" & "E6"))
Dim ws As Worksheet
ws.Range("M49").Formula = "=IF(OR($N$43="",$N$44="",$N$45=""),"",INDIRECT(" '" & $N$43 & "[" & $N$44 & "]" & $N$45 & "'!" & "E6"))"
I need to have a macro write the following formula into a cell, but with all the inverted commas (") it does not work and I can't get it to work. Where do I need to insert what for it to work? Please help.
=IF(OR($N$43="",$N$44="",$N$45=""),"",INDIRECT(" '" & $N$43 & "[" & $N$44 & "]" & $N$45 & "'!" & "E6"))
Dim ws As Worksheet
ws.Range("M49").Formula = "=IF(OR($N$43="",$N$44="",$N$45=""),"",INDIRECT(" '" & $N$43 & "[" & $N$44 & "]" & $N$45 & "'!" & "E6"))"