+ Reply to Thread
Results 1 to 3 of 3

Running a macro without affecting formulas.

  1. #1
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Running a macro without affecting formulas.

    I am looking to use my formula that cleans up my "Raw" sheet, but every time I run it the formulas on my "sample data" sheets get messed up. Anyone know a way around this? Please reference the form I included.

    Sample Workbook1.xlsm

    *Wasn't sure if this was a macro or formula question. If it should be moved to macros can a mod please do so?*
    Last edited by Teblol; 06-04-2015 at 04:27 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Running a macro without affecting formulas.

    When you delete rows, formulas that refer to those rows will give #REF! errors because they don't exist anymore. That's the way Excel cell referenced are designed. I am assuming that's what's happening. To fix this, fix your formulas (not your code). See attached. The formulas will always refer to the desired row, regardless of deletions and insertions.

    By the way, when you describe a problem please be more specific than "messed up". Always give error codes, error messages, etc.

    BTW it was a macro question but a formula solution so I left in this subforum.
    Attached Files Attached Files
    Last edited by 6StringJazzer; 06-04-2015 at 04:48 PM. Reason: in blue
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: Running a macro without affecting formulas.

    Very cool trick! I will make sure to note that one down. Thanks for your help. I will also make sure to make my post more detailed next time regarding the error codes. Thanks for the info.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Inserting columns without affecting referencing formulas
    By robmarsh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-16-2014, 10:55 AM
  2. [SOLVED] Cell Formatting affecting formulas
    By JakeMann in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-06-2013, 04:52 AM
  3. Drag and Drop affecting formulas
    By JakeMann in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-25-2013, 05:49 AM
  4. Formatting of numbers affecting formulas
    By JakeMann in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-03-2013, 03:56 AM
  5. How do you delete rows without affecting formulas?
    By modytrane in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-28-2009, 02:57 PM

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