moheganburner
Board Regular
- Joined
- Dec 2, 2005
- Messages
- 158
Is it possible to use VB to paste a function into a cell? I tried to do it literally, i.e.:
but I think all the quotations are a problem.
Thanks,
MB
Code:
Sub Paste()
Sheets("Sheet3").Range("A:A65536").Function = "=TRIM(IF(COUNTIF(B1:C1,"*Joe*"),"Pay","")&" "&IF(SUM(COUNTIF(D1:E1,{"*Scott*","*Frank*","*Pete*"})),"Fire",""))&" "&IF(COUNTIF(F1:G1,"*Tim*"),"Raise","")"
End Sub
but I think all the quotations are a problem.
Thanks,
MB