+ Reply to Thread
Results 1 to 3 of 3

How do I edit a formula as part of a macro?

  1. #1
    Jacob Wood
    Guest

    How do I edit a formula as part of a macro?

    I'm trying to record a macro that will paste stuff from another work sheet,
    then update the formulas by adding the items that are in the pasted part to
    the ones that were already there. Whenever I try to do it the macro stops
    recording until I get out of the formula.

  2. #2
    Dave O
    Guest

    Re: How do I edit a formula as part of a macro?

    You've reached the threshold that separates recording macros and
    writing code from scratch. From here, to update a formula in a cell,
    you'll have to know how to parse strings of text- basically taking the
    formula apart letter by letter, and replacing old elements with new.
    Can you give an example of the old formula, and what has to be updated?


  3. #3
    Registered User
    Join Date
    01-11-2005
    Posts
    24
    I have a situation sort of like this one, but I have my macro set up to add a project. Down on the bottom there is the summary cells and they have the formula written in like this.

    Cell K85 Formula = "=K7+K14+K21+K28+K35+K42+K49+K56+K63+K70"

    Now say I add a new project, and that project is found on the next 7 set of cells, how would I go about adding K77 to the formula?

    Link Strife

+ 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