+ Reply to Thread
Results 1 to 19 of 19

create a new sheets & copy data from sheet to multiples and sum based on month

  1. #1
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    create a new sheets & copy data from sheet to multiples and sum based on month

    hello
    i have data about 10000 rows but i attach a simple data to understand me i would when choose from dropdown the month it creates sheet's name the month like jan and bring all of data relating this month and insert total in lastrow to sum data with grey color so and if i repeat again data already existed then ignore them just a new data i apply that as example in sheet"jan" after choose from dropdown in h1 to understand what i want
    Attached Files Attached Files

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    Is sheet1 overwritten with new data all the time or is new data just been added to the bottom...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    hi, sintek sheet1 is new data just been added to the bottom

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    Sheet1 Module...
    Please Login or Register  to view this content.
    Standard Module...
    Please Login or Register  to view this content.
    Last edited by sintek; 08-11-2020 at 06:44 AM.

  5. #5
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    it gives me run time error 13 in this line
    HTML Code: 

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    Works in your sample file...

    Declare Crit As Date and check...
    Attached Files Attached Files
    Last edited by sintek; 08-11-2020 at 07:23 AM.

  7. #7
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    this is mystery sintek i uploaded file in post #6 it directly shows me the same error there is something wrong but i no know

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    Have you tried...
    Declare Crit As Date and check...
    I have replaced above file with results...

    Untitled.png
    Last edited by sintek; 08-11-2020 at 07:25 AM.

  9. #9
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    i did it nothing happens

  10. #10
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    does it work for you ?

  11. #11
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    Try adding the red snippet
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    unfortunately still error continues

  13. #13
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    At a loss then...Post 8 shows it works for me...either options...String or Date

    Try this...
    Please Login or Register  to view this content.
    or declare Crit as variant
    Last edited by sintek; 08-11-2020 at 07:52 AM.

  14. #14
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    sorry sintek if i waste your time after many tries for your code i have found the problem my office is Arabic language if dropdown is not match with the language of office then cause the problem i converted to Arabic language the code works very well as your picture above but i have last thing to amend the code in sheet1 if the dropdown is empty when run the macro sum all of data in sheet1

  15. #15
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    Replace Sheet Module code with this...
    Please Login or Register  to view this content.
    Last edited by sintek; 08-11-2020 at 09:37 AM.

  16. #16
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    hi, sintek could you do the same thing about the border and merge cell "total" the lastrow as in months

  17. #17
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    see amended code in post 15

  18. #18
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    you have achieved great work i would thank you for your assistance and time many thanks

  19. #19
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: create a new sheets & copy data from sheet to multiples and sum based on month

    Pleasure...Thank you for adding to my 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. Help with copying data from master sheet to multiple sheets based on month
    By maym in forum Excel Programming / VBA / Macros
    Replies: 63
    Last Post: 01-09-2023, 01:58 AM
  2. [SOLVED] Marge data inside Master workbook getting data multiples files based specfic sheets
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-22-2021, 07:14 AM
  3. Replies: 9
    Last Post: 03-28-2017, 08:30 PM
  4. [SOLVED] Macro Code for Splitting one sheet data into multiples sheets
    By hkbhansali in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-14-2016, 05:06 AM
  5. Replies: 3
    Last Post: 10-01-2014, 01:49 PM
  6. [SOLVED] Copy Multiples Sheets to One Sheet by Criteria in Column (in All sheets)
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-13-2014, 08:36 PM
  7. Replies: 2
    Last Post: 11-05-2012, 09:28 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