View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Insert " " into a string

Try:-

Double double quotes for the spaces i.e. "" ""

Mike

"CWillis" wrote:

I am inserting formulas into cells using a macro. Several formulas require a
blank. (" ")

Ex1: Sheets("Frame 6").Range("G3").Value = "=IF(ISERROR(VLOOKUP(A3," &
CSpath & ",29,FALSE))," ",VLOOKUP(A3," & CSpath & ",29,FALSE))"

Ex2: Sheets("Frame 6").Range("F3").Value = "=IF(D3=1,VLOOKUP(A3," & CSpath &
",34,FALSE)," ")"

However, Excel won't let you do this. How can I get the blanks in there?
Thanks in advance.

-Chris