Results 1 to 3 of 3

Using VBA to enter a formula into a cell - conflict in programming terms and formula

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-24-2009
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    178

    Using VBA to enter a formula into a cell - conflict in programming terms and formula

    Hi everyone,

    I wonder if someone could help me please?

    Part of the procedure I am writing needs a formula to be entered in some cells. The formula I want in the cells is:

    
    Cells(3, 4).FormulaR1C1 = "=rc[1,-1]-("0:0:01")"
    The cell I am pointing to is a time and I want to subtract one second from that time. This is all fine and works fine when I type it manually in. Likewise I have no problems entering formulas but in this instance (and many others) the formula contains " which VBA recognises as part of the programming, not part of the formula. This also happens with :, is there a way around this problem that anyone knows of?

    Many thanks.
    Last edited by Jessica.Bush; 01-23-2011 at 06:22 PM.

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