I was about to say, the formula need to have a quadruple " if it is to be recoginised as a string which is to be embedded into a formula...
"=IF('2006-1'!A2<>"""",'2006-1'!A2,"""")"
But then again looks like you figured it out anyhow. There is an alternative which I prefer...
Cells(J, 19).Formula = "=IF('2006-1'!I" & RowNo & ">0,'2006-1'!I" & RowNo & "," & Chr$(34) & Chr$(34) & ")"
That is, to use the ASCII character code set to specify the Chr$(34) i.e. ", then concatenate this to the rest of the formula. But that is only my preference.
cheers
Matt
|