+ Reply to Thread
Results 1 to 7 of 7

VBA auto sum not working

  1. #1
    Registered User
    Join Date
    03-31-2015
    Location
    us
    MS-Off Ver
    2010
    Posts
    5

    VBA auto sum not working

    If i manually enter overtime hours worked in column A it will auto sort lowest to highest like the VBA code is written (or in my case, copied), but what i want to do is in A2 put the formula =SUM(E2:AM2) and have it auto sort by the sum in A2 and not by me entering it manually in A2. I then want to copy the formula as i add employee names. I have tried what i described above but it will not work for me, any help will much appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: VBA auto sum not working

    put your sum formula in cells in column A and change your macro to this:
    Please Login or Register  to view this content.
    Any changes made to a cell in column E:AM will trigger your macro and sort on column A value.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: VBA auto sum not working

    Tested, but not destruction tested.

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: VBA auto sum not working

    Maybe this to put the formula in automatically:

    Please Login or Register  to view this content.

    Regards, TMS

  5. #5
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: VBA auto sum not working

    Maybe,
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-31-2015
    Location
    us
    MS-Off Ver
    2010
    Posts
    5

    Re: VBA auto sum not working

    The first one worked like a charm, thanks.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: VBA auto sum not working

    You're welcome. Thanks for the rep.

+ 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. Why is auto sum not working
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-05-2018, 06:24 PM
  2. Auto-filling not working
    By Memento2009 in forum Excel General
    Replies: 1
    Last Post: 04-23-2009, 09:04 PM
  3. auto calculate not working
    By Noarmom in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-27-2006, 10:45 AM
  4. auto filter not working
    By [email protected] in forum Excel General
    Replies: 3
    Last Post: 06-05-2006, 07:20 PM
  5. Auto Filter Not working
    By beata in forum Excel General
    Replies: 2
    Last Post: 05-04-2006, 09:15 AM
  6. auto complete not working
    By Sarah in forum Excel General
    Replies: 3
    Last Post: 02-24-2006, 08:35 AM
  7. [SOLVED] What do you do if you have auto save set, but it is not working?
    By Jennifer in forum Excel General
    Replies: 3
    Last Post: 09-16-2005, 02:05 PM
  8. Auto Calc not working
    By littlejon20 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-30-2005, 06:06 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