+ Reply to Thread
Results 1 to 17 of 17

add dates until finishing the month based on current month

  1. #1
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    add dates until finishing the month based on current month

    Hi
    I search for macro to insert new column contains date(today) on the header after column C until finishing the month based on current month ,
    should start after STOCK sheet from JAN sheet to DEC sheet. every sheet contains MONTH name depends on current month . so should add date(today) every day until finishing the month based on current month . with considering don't repeat inserting column if I added new column for day no need adding again for the same day.
    I put the result for JAN,FEB,MAR after column C .
    by the way the sheets names will already be existed .
    Attached Files Attached Files
    Last edited by tubrak; 03-18-2024 at 04:41 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: add dates until finishing the month based on current month

    Why not create ALL month sheets in one go?

    And avoid dark text on dark background : do dark/light or light/dark
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month

    Why not create ALL month sheets in one go?
    that's because when add each sheet based on current month .
    And avoid dark text on dark background : do dark/light or light/dark
    what's the problem with theses colors?!

  4. #4
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month

    Else body could help me?

  5. #5
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month


  6. #6
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month

    bump

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,893

    Re: add dates until finishing the month based on current month

    Huge set of data - lots of empty columns - no expected results - 231 views - no help offered. What do you expect?

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month

    lots of empty columns
    yes and this is what I want, will insert empty column for date(today) based on current month until finshing of dates for current month and will move to next sheet to do the same thing based on current month.

  9. #9
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month

    I'm not sure what is not exactly clear?!

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: add dates until finishing the month based on current month

    Why do not do as I suggested in post #2 and create the 12 monthly sheets in one go: I see no advantage or merit in doing it in the way you propose.

    Sample VBA

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 03-17-2024 at 02:10 PM.

  11. #11
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month

    Thanks
    I will see your code how works and comeback soon.

  12. #12
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month

    Why do not do as I suggested in post #2 and create the 12 monthly sheets in one go: I see no advantage or merit in doing it in the way you propose.
    becuase I got macro by jindon in earlier time to create sheets based on current month , not at once as you suggest.
    the macro will add sheet(month) based on current month , copy the just A,B and last column from sheet to next sheet(current month) so I don't need macro to create sheets again as you did it that's why I ask for each sheet individually based on current month.
    ok based on your comment that's not impossible or difficult for you.
    but can adjust your code by just add dates for the active sheets after column C and if it's possible make borders and formatting without creat sheets because will existed by jindon's macro .

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

    Re: add dates until finishing the month based on current month

    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month

    it's perfect !
    thanks so much ,jindon for modfying the original code instead of create new macro .
    Last edited by tubrak; 03-18-2024 at 06:31 AM.

  15. #15
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month

    Hi jindon !
    sorry comeback .
    I try to change refernce row by start from row4 instead of row1 as in OP but gives error
    as bold reference cells I changed but I'm faild , may you help me again, please?
    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: add dates until finishing the month based on current month

    Please Login or Register  to view this content.

  17. #17
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: add dates until finishing the month based on current month

    it works !
    again thank you so much for comeback for me.

+ 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: 1
    Last Post: 04-29-2016, 01:28 PM
  2. [SOLVED] Determine work days in current month or next month based on day of the month
    By sbrnard in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-29-2014, 05:14 PM
  3. [SOLVED] Pick a cell containing current month actulas based what the current month is.
    By vanbasten007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-10-2014, 01:17 AM
  4. VBA: Piviot table Month auto select based on current month?
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2013, 08:45 AM
  5. VBA: Piviot table Month auto select based on current month?
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-21-2013, 07:18 AM
  6. [SOLVED] Help with a system to auto populate month names based on current month
    By rosboy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2012, 05:17 PM
  7. [SOLVED] VBA to identify the current month and previous month based on system date
    By ravikumar00008 in forum Excel General
    Replies: 10
    Last Post: 07-26-2012, 10:04 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