View Single Post
  #1   Report Post  
AlGrrrr AlGrrrr is offline
Junior Member
 
Posts: 3
Default Problem with If formula and concatenate "&"

Very new to VBA.

I'm stumped. It seems very simple enough but I can't get it to work. I keep getting the Compile error: Expression expected

ActiveCell.Offset(0, 8).Formula = IF(ActiveCell.Offset(0, 5)="MC","M" & ActiveCell.Offset(0, 6),"V" & ActiveCell.Offset(0, 6))

I've tried adding quotation marks at the beginning and end of the formula but when I run the macro it only writes the formula, not the result.

Please help
Attached Files
File Type: doc Do Until IsEmpty.doc (19.5 KB, 77 views)