excel - VBA: Cell designations not being evaluated -
i have following code in vb:
activecell.formula = " = companyname " & " & " & "r[-12]c[-3]" & " & " & "vlookup(rc[-6],r3c7:r22c18,9)"
i want cell has in it: = companyname & d25 & vlookup(a26,$g$3:$r$22,9)
instead, cell = companyname & r[-12]c[-3] & vlookup(rc[-6],r3c7:r22c18,9)"
basically, cell designations not being evaluated.
what doing wrong?
change activecell.formula activecell.formular1c1
by using ".formula", expects cells referenced in "a1" fashion, , therefore doesn't know how compute r/c references, , appears see whole thing string instead of formula (also may need remove spaces between &'s).
Comments
Post a Comment