+ Reply to Thread
Results 1 to 15 of 15

AutoSum already selected columns

  1. #1
    Registered User
    Join Date
    09-11-2018
    Location
    Basseterre, St.Kitts
    MS-Off Ver
    360
    Posts
    8

    AutoSum already selected columns

    Hi,

    I'm VERY new to this but have picked up a bit already.

    I have the columns already selected by way of my macro, but I need to be able to perform a sum on each.

    The spreadsheet changes in size weekly, so I don't want to the rows "hard coded" in the macro.

    Can anyone help here?

    Like I said I've already got the end of each column selected. So it's just a matter of running the sum formula in there.

    Any assistance you can provide would be really appreciated.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: AutoSum already selected columns

    It would be helpful to see the code you will be using.
    Selecting is typically not required and really slows things down.
    Are you willing to share your code with us?

  3. #3
    Registered User
    Join Date
    09-11-2018
    Location
    Basseterre, St.Kitts
    MS-Off Ver
    360
    Posts
    8

    Re: AutoSum already selected columns

    I have 8 columns of figures that are separated by blank rows.
    The sheet can vary between 1400 - 6000 rows long, which is separated into around 40 sets of row.

    So at each break there is a blank row.

    At columns G,H,I,J,K,L,M,N in the blank row I need the macro to autosum the data above.

    When I was doing the macro it would put in the actual row, but when the sheet changes from week to week, this won't work.

    The code that i've used to select the blank rows is below;
    Thanks

    Please Login or Register  to view this content.
    Last edited by Chadcp1; 09-12-2018 at 07:27 AM.

  4. #4
    Registered User
    Join Date
    09-11-2018
    Location
    Basseterre, St.Kitts
    MS-Off Ver
    360
    Posts
    8

    Re: AutoSum already selected columns

    This is the full code... Forgive my ignorance... I just started this yesterday.

    The sheet size changes often.. So below everything works and once this runs all I have to click is autosum and its done... But I'd like the macro to do everything.

    Please Login or Register  to view this content.
    Last edited by Chadcp1; 09-12-2018 at 07:27 AM.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: AutoSum already selected columns

    Before continuing, please read and react to rule #2 of the Forum Rules at the top.

    Once done with that, attach a representative workbook without personal (names, addresses, phone numbers etc) data.
    Last edited by jolivanes; 09-12-2018 at 12:28 AM. Reason: ask for attachment

  6. #6
    Registered User
    Join Date
    09-11-2018
    Location
    Basseterre, St.Kitts
    MS-Off Ver
    360
    Posts
    8

    Re: AutoSum already selected columns

    I've corrected the issue above.

    I'm having difficulty uploading the attachment to this replay.

    I've uploaded the attachment to an upload service but I'm unable to attach the link...

    What now?
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: AutoSum already selected columns

    Try this on a copy of your original.
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    09-11-2018
    Location
    Basseterre, St.Kitts
    MS-Off Ver
    360
    Posts
    8

    Re: AutoSum already selected columns

    Thanks, but this didn't work.

    It's changing the values in the row BELOW the blank rows.. giving all of them a "0" value.

    So I think the calculation needs to come up by 1 row.

    Thanks

  9. #9
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: AutoSum already selected columns

    What about attaching a representative workbook. The attachment in Post #6 has no empty rows as you say there are in your original. One of the columns to be summed have dates in it.
    Anyway, on a sample file I made, the code works perfect.
    See attached
    Attached Files Attached Files
    Last edited by jolivanes; 09-12-2018 at 11:54 AM.

  10. #10
    Registered User
    Join Date
    09-11-2018
    Location
    Basseterre, St.Kitts
    MS-Off Ver
    360
    Posts
    8

    Re: AutoSum already selected columns

    The file I sent is the raw data.

    I then ran my macro, without your code and it would clear it up with the blank rows

  11. #11
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: AutoSum already selected columns

    Check out the attachment in Post 9.
    It sounds like the empty rows are not empty. They might have something in it but without having the file to check, it's just a stab in the dark.

  12. #12
    Registered User
    Join Date
    09-11-2018
    Location
    Basseterre, St.Kitts
    MS-Off Ver
    360
    Posts
    8

    Re: AutoSum already selected columns

    Ok here is the file after I run my macro (SIX) showing the blank spaces
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: AutoSum already selected columns

    The so called blank rows are not blank rows. As you see, the cells in columns A and B have data in them.
    Change code to
    Please Login or Register  to view this content.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    09-11-2018
    Location
    Basseterre, St.Kitts
    MS-Off Ver
    360
    Posts
    8

    Re: AutoSum already selected columns

    SUCCESS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Man I can't thank you enough!!!

  15. #15
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: AutoSum already selected columns

    Glad it works for you.
    Good luck.

+ 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. Would like autosum figure to appear in selected cells
    By vinny1 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 09-23-2009, 07:12 AM
  2. Autosum returns an incorrect zero value on the selected cells
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 09-06-2005, 05:05 PM
  3. [SOLVED] Autosum returns an incorrect zero value on the selected cells
    By trying hard in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  4. Autosum returns an incorrect zero value on the selected cells
    By trying hard in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  5. [SOLVED] Autosum returns an incorrect zero value on the selected cells
    By trying hard in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  6. Autosum returns an incorrect zero value on the selected cells
    By trying hard in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  7. [SOLVED] Autosum returns an incorrect zero value on the selected cells
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-06-2005, 05:05 AM
  8. [SOLVED] Autosum returns an incorrect zero value on the selected cells
    By trying hard in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 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