View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
ManhattanRebel ManhattanRebel is offline
external usenet poster
 
Posts: 85
Default VBA Code for "" empty cell

The following IF function works in Excel, but when I copy it into VBA so I
can excute it in a range it will not work.

Range("p6:p40").Formula = "=IF(C6="","",(P5+O6)-M6)"

I think VBA has a problem with "" meaning an empty cell.

Can someone tell me what I can substitute for "" so my formula will work in
VBA?