+ Reply to Thread
Results 1 to 2 of 2

To include quote marks in selection.formula

  1. #1
    Ben
    Guest

    To include quote marks in selection.formula

    Selection.Formula = "=IF(G4="C",L4-F4,0)"

    I would like the above formula to be input in the active cell. The trouble
    is that the appearance of the quote marks around C produces a syntax error in
    VBA. How do I include quote marks in a formula that Ineed to input using VBA.
    Thank you

  2. #2
    Registered User
    Join Date
    06-13-2006
    Posts
    76

    Quotation marks

    Hi Ben,

    Try:
    Selection.Formula = "=IF(G4=""C"",L4-F4,0)"

    That should do the trick!

    Good luck!


    Leonidas

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1