+ Reply to Thread
Results 1 to 4 of 4

Macro that will calculate sum of cells even if rows are added

  1. #1
    Registered User
    Join Date
    11-08-2011
    Location
    MA
    MS-Off Ver
    Office 2010
    Posts
    12

    Macro that will calculate sum of cells even if rows are added

    Hey guys,

    So I'm trying to create a macro that will simplify dealing with a file we receive at work pretty often. I've enclosed a spreadsheet that shows a very basic example of the files we receive. What I need to happen is this: On the rows that have only the Company # in column A and Total $ in column D (ie. rows 5 and 6), I need the Total $ amount moved up one row and then for the row it was previously in to be deleted (at that point that row should only have the Company $ and no other data in it so it's basically useless). The problem I'm having is that if any rows are added to the file (for instance if an row was added between rows four and five) it would throw off my macro. If anyone has any ideas for me I'd appreciate it!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Macro that will calculate sum of cells even if rows are added

    example.xlsm

    How's that ?
    Elegant Simplicity............. Not Always

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Macro that will calculate sum of cells even if rows are added

    I went with:

    Please Login or Register  to view this content.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Registered User
    Join Date
    11-08-2011
    Location
    MA
    MS-Off Ver
    Office 2010
    Posts
    12

    Re: Macro that will calculate sum of cells even if rows are added

    Thanks for the help guys!

+ 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. Rows added by macro sometimes automatically duplicated in shared excel file
    By Prince Skeleth in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-15-2014, 02:46 PM
  2. [SOLVED] filter option always available on tables when rows are added and deleted through macro
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 07-08-2013, 09:25 AM
  3. Hide Unhide Macro changes as rows are added
    By ando185 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2013, 03:20 PM
  4. Active X (Macro) to Sort data range to included added rows
    By tims31 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-14-2012, 01:21 PM
  5. Remove Border From Cells Added From Macro
    By november84 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-07-2011, 11:58 AM

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