+ Reply to Thread
Results 1 to 10 of 10

Auto sum from one sheet to another thru macro

  1. #1
    Forum Contributor
    Join Date
    12-23-2012
    Location
    Pakistan
    MS-Off Ver
    Microsoft office LTSC professional plus 2021 version 2403 (Build 17425.20176)
    Posts
    365

    Auto sum from one sheet to another thru macro

    In the attachment, there are three sheets i.e. LADY, GENTS & SUMMARY, I take the sum of a date from LADY & GENTS sheets to SUMMARY sheet everyday, now I want to automate this process, for this purpose I need a macro whenever I run the macro it takes the sum of GENTS & LADY of the last sum to the SUMMARY sheet.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Auto sum from one sheet to another thru macro

    Let's assume the last date in sheets LADY & GENTS is 01/08/2018 and it already exists in sheet SUMMARY
    We overwrite previous value ... of course !
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Contributor
    Join Date
    12-23-2012
    Location
    Pakistan
    MS-Off Ver
    Microsoft office LTSC professional plus 2021 version 2403 (Build 17425.20176)
    Posts
    365

    Re: Auto sum from one sheet to another thru macro

    HI Mr. PCI
    I don't think you understand the question, I just want to take the sum of every individual date to the SUMMARY sheet, if you see the LADY & GENTS sheet, and also see the last date on both the sheet i.e. 08/01/2018, I just want to take the sum of both dates in summary sheet as an example 34,346 of gents and 7,900 of lady to the summary sheet. Please see the attachment, now I highlighted the figures which I want to take.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Auto sum from one sheet to another thru macro

    geniusufo007,

    Are the dates in both Lady/Gents match to the dates in Summary?

    You have block of 2018/Jan/1 then block of 2018/Feb/1 and so on while Summary have 2018/Jan/1, 2018/Jan/2 so on.

  5. #5
    Forum Contributor
    Join Date
    12-23-2012
    Location
    Pakistan
    MS-Off Ver
    Microsoft office LTSC professional plus 2021 version 2403 (Build 17425.20176)
    Posts
    365

    Re: Auto sum from one sheet to another thru macro

    Yes, the date must be match with the figures. As you may see the sum of both (gents/lady) are showing under the heading of gents and lady in the SUMMARY sheet with the same date in the (gents/lady), there is no FEB in the attachment, all the date are of Jan, 2018

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Auto sum from one sheet to another thru macro

    If the dates match, this should work,(doesn't work here because of the reason I mentioned)
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Auto sum from one sheet to another thru macro

    Perhaps next code

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    12-23-2012
    Location
    Pakistan
    MS-Off Ver
    Microsoft office LTSC professional plus 2021 version 2403 (Build 17425.20176)
    Posts
    365

    Re: Auto sum from one sheet to another thru macro

    Sir,
    Look at the attachment, I have run your macro on the attachment but it takes only the first sum not the others please see
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Auto sum from one sheet to another thru macro

    That's why I mentioned about your dates.

    Put this formula in somewhere in Lady sheet

    =TEXT(A15,"yyyy/mmm/d")

    it shows 2018/Feb/1, not Jan/2, so my code doesn't work.

  10. #10
    Forum Contributor
    Join Date
    12-23-2012
    Location
    Pakistan
    MS-Off Ver
    Microsoft office LTSC professional plus 2021 version 2403 (Build 17425.20176)
    Posts
    365

    Re: Auto sum from one sheet to another thru macro

    Thank you Mr. Jindon that's really great solution and also thanks Mr PCI

+ 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. Macro vba auto email runtime error when having difrent sheet to name range sheet open
    By no1freeman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2015, 01:35 AM
  2. [SOLVED] Auto save of data from sheet 1 to sheet 2 regularly when i run macro
    By bmbalamurali in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-17-2014, 10:24 AM
  3. How to get an auto macro to run on first sheet of workbook?
    By Parakeet3 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-15-2014, 02:38 PM
  4. [SOLVED] I'm a new user: Need a macro that will auto paste data from one sheet row to another sheet
    By Daotor in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-22-2013, 10:15 AM
  5. [SOLVED] Auto Macro the pulls data from on sheet, prints on another sheet, then deletes information
    By wjwelch1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-06-2013, 01:54 PM
  6. [SOLVED] macro to auto copy data from multiple sheet to one master sheet
    By roger556 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2012, 01:52 AM
  7. [SOLVED] How to auto run a macro in actived sheet?
    By Tvnguye in forum Excel General
    Replies: 7
    Last Post: 01-11-2006, 08:55 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