+ Reply to Thread
Results 1 to 5 of 5

Macro to Total a Column Up 15 cells and place total in cell of last row

  1. #1
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    165

    Macro to Total a Column Up 15 cells and place total in cell of last row

    Can anyone help with a macro to sum up 15 cells in a column and place the total in the last row ?Template Strand SHIPMENTS .xlsm

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    16,906

    Re: Macro to Total a Column Up 15 cells and place total in cell of last row

    I looked at your file and I think your explanation above is a little lightweight for what you are actually trying to do. What you don't say above is that you already have a macro that creates several rows of summary data based on hundreds of lines of raw data above. You want to modify that existing macro to add the sum of each of the 14 category summary rows.

    What I can't figure out is where you are creating the summary data in the range F517:R531, so I can't tell where in the code is the appropriate place to insert the sums. You have a lot of code to wade through and it would be very time-consuming for someone like me to analyze the whole thing.

    Also, there are several opportunities for streamlining this code. For example, you have many lines to do this:
    Please Login or Register  to view this content.
    repeated 15 times, up to LR + 1. This could be done all at once like this:

    Please Login or Register  to view this content.
    The same applies to formatting for columns F, G, and H. You can replace hundreds of lines of code with this:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    165

    Re: Macro to Total a Column Up 15 cells and place total in cell of last row

    I really appreciate your input on streamlining all of the coding and I will make the necessary changes. What I'm trying to achieve is adding a total by each Month. I'm currently using the below, but I'm having to to clear contents of one row after I have ran the macro.
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    165

    Re: Macro to Total a Column Up 15 cells and place total in cell of last row

    Can anyone help?

  5. #5
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    165

    Re: Macro to Total a Column Up 15 cells and place total in cell of last row

    i SOLVED THIS WITH THE FOLLOWING CODE
    Please Login or Register  to view this content.

+ 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. Replies: 11
    Last Post: 04-11-2013, 10:56 AM
  2. Place total in another column
    By druid1980 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2012, 12:47 PM
  3. VBA Multiplication of Two Columns
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2012, 02:05 PM
  4. Need a macro to total different lines and move total to new cell
    By cmefix in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-09-2012, 02:08 PM
  5. Replies: 8
    Last Post: 08-06-2009, 09:02 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