+ Reply to Thread
Results 1 to 4 of 4

Combining Formula

  1. #1
    Registered User
    Join Date
    08-10-2007
    Posts
    13

    Combining Formula

    If I have a formula in a cell how can I keep the current formula but and add to it?

    Example:

    Sub DoesStuff

    Range("A1").ForumlaR1C1 = "= R[1]C + R[5]C"

    {other stuff happens}

    Range("A1").ForumlaR1C1 = Range("A1").ForumlaR1C1 & "+ R[9]C"

    End Sub

    This fails. What can I do to make it work?

  2. #2
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302
    Please Login or Register  to view this content.
    Last edited by FrankBoston; 08-11-2007 at 05:51 PM.
    FrankBoston is the pen name for Andrew Garland, Lexington MA

  3. #3
    Registered User
    Join Date
    08-10-2007
    Posts
    13
    Quote Originally Posted by FrankBoston
    Please Login or Register  to view this content.

    How is the name "Formula" the problem? I see my typo there but that was typed from memory, not copied from the subroutine (the office doesn't have net access).

    What is the general way to combine formula?

  4. #4
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302
    A formula is a text string which is interpreted by Excel. It has to be correctly constructed to be recognized as correct. The method you used looks correct to me, other than the misspelling of FormulaR1C1.

+ 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