+ Reply to Thread
Results 1 to 4 of 4

VBA to fill dates of current month sequentially

  1. #1
    Forum Contributor
    Join Date
    07-21-2018
    Location
    London, England
    MS-Off Ver
    Excel for Mac Version 16.15
    Posts
    117

    VBA to fill dates of current month sequentially

    Hello!

    I need some help with writing some vba code to auto populate a range of dates when the user opens my template.

    On sheet 'CashTotals' I'd like column B to contain the dates of the current month, starting from B5.

    On sheet 'PDQTotals' I'd like column B to contain the dates of the current month, starting from B7.

    Then, I have sheets called '1,' '2,' '3,' etc. Each sheet is identical and I'd like the merged cell C2:J2on each sheet to contain the date of the current month that the sheet name refers to (i.e sheet '1' will have 01/03/19, sheet '2' 02/03/19 etc).

    I have attached my workbook for some more insight!

    Please could someone help me with this?

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: VBA to fill dates of current month sequentially

    Quick and dirty (so could be tidied up) but try this in your Workbook Open event:
    Please Login or Register  to view this content.
    BSB

  3. #3
    Forum Contributor
    Join Date
    07-21-2018
    Location
    London, England
    MS-Off Ver
    Excel for Mac Version 16.15
    Posts
    117

    Re: VBA to fill dates of current month sequentially

    Works a charm - thank you so much!!

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: VBA to fill dates of current month sequentially

    No problem. Happy to help

    BSB

+ 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: 16
    Last Post: 11-23-2019, 01:41 PM
  2. auto scroll to current month-year then fill color yellow
    By k1dr0ck in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2018, 09:39 PM
  3. Replies: 1
    Last Post: 04-29-2016, 01:28 PM
  4. [SOLVED] Need a way to automaticaly fill in Friday dates from prior month from current date entry
    By uniqbboy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-15-2014, 11:11 AM
  5. [SOLVED] populating current month Saturdays dates vba
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-27-2014, 06:52 AM
  6. Click-Fill Current and Upcoming dates
    By Pharper in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2011, 08:00 PM
  7. [SOLVED] Fill column with dates of month depending on month in A1
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-10-2005, 09: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