+ Reply to Thread
Results 1 to 3 of 3

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

  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:

    Please Login or Register  to view this content.
    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.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

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

    Your R1C1 notation is awry and without knowing which cell you're trying to reference it's hard to give an exact solution - assuming D3 is meant to be 1 second less then C4:

    Please Login or Register  to view this content.
    for a very brief overview of R1C1 see: http://www.excelforum.com/2171545-post2.html - this is just a post I made some time ago for another member - covers some basics.

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

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

    Hi DonkeyOte,

    Yep, that was a daft mistake with the R1C1 coding, it is the "'s that I have been having difficulty with though but you have solved that for me, so thanks!

+ 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