+ Reply to Thread
Results 1 to 6 of 6

Date Auto filling from day 1 to the last day of the month

  1. #1
    Forum Contributor
    Join Date
    12-23-2020
    Location
    Mbabane, Eswatini
    MS-Off Ver
    2016
    Posts
    142

    Date Auto filling from day 1 to the last day of the month

    Good day.
    I have a date table that I want to auto fill from the 1st of the month in cell A2 to last day of the month (C32). The date filling should be linked to cell D2 of the spreadsheet as per the attached.
    What excel formula should I use that will make sure that the date filling ends on the last day of the month and does not over lap to the following month?
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,819

    Re: Date Auto filling from day 1 to the last day of the month

    You can use this formula in A2:

    =IF(Pay_Date+ROWS($1:1)-1>EOMONTH(Pay_Date,0),"",Pay_Date+ROWS($1:1)-1)

    where Pay_Date is the name you have allocated to cell D2. Copy this down to A32.

    Change the date in D2 (e.g. to 1/02/2022) and the final few days will disappear.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,298

    Re: Date Auto filling from day 1 to the last day of the month

    Formula 1-28
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula 29-31
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    12-23-2020
    Location
    Mbabane, Eswatini
    MS-Off Ver
    2016
    Posts
    142

    Re: Date Auto filling from day 1 to the last day of the month

    Quote Originally Posted by Pete_UK View Post
    You can use this formula in A2:

    =IF(Pay_Date+ROWS($1:1)-1>EOMONTH(Pay_Date,0),"",Pay_Date+ROWS($1:1)-1)

    where Pay_Date is the name you have allocated to cell D2. Copy this down to A32.

    Change the date in D2 (e.g. to 1/02/2022) and the final few days will disappear.

    Hope this helps.

    Pete
    Thanks Pete. Works 100%

  5. #5
    Forum Contributor
    Join Date
    12-23-2020
    Location
    Mbabane, Eswatini
    MS-Off Ver
    2016
    Posts
    142

    Re: Date Auto filling from day 1 to the last day of the month

    Quote Originally Posted by Czeslaw View Post
    Formula 1-28
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula 29-31
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks Czeslaw. YOu have solved my problem.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,819

    Re: Date Auto filling from day 1 to the last day of the month

    You're welcome, and thanks for the rep.

    Pete

+ 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: 02-04-2021, 03:28 AM
  2. Need help with Auto filling static date and time.
    By luckzy in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 11-17-2014, 07:22 PM
  3. [SOLVED] I need help on Auto Filling the date across 31 worksheets in my format
    By PeterSCTS in forum Excel General
    Replies: 6
    Last Post: 05-07-2014, 06:27 PM
  4. I need help in Auto-Filling the date in the same cell across 31 worksheets
    By PeterSCTS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2014, 01:29 AM
  5. [SOLVED] I need help in auto filling the date across 31 worksheets using my format
    By PeterSCTS in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2014, 01:28 AM
  6. Auto date filling
    By Shakeelqamar in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-07-2008, 06:09 PM
  7. Auto Protecting cells & auto filling date
    By ccarmock in forum Excel General
    Replies: 7
    Last Post: 09-30-2005, 05:05 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