+ Reply to Thread
Results 1 to 6 of 6

display days in month in the cell according to date

  1. #1
    Registered User
    Join Date
    12-04-2012
    Location
    Fort Worth, TX
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question display days in month in the cell according to date

    I need a formula to display the days in the month in the cell according to the month of a date in another cell. For example: if the date in the C4 is in the month of December the cell B4 should be 31 representing the days in that month. If the date is in November the cell B4 needs to be 30 to represent the 30 days of November.

    Thanks do much for the help!
    Attached Files Attached Files
    Last edited by mraines; 12-05-2012 at 09:48 AM. Reason: Fixed

  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,704

    Re: display days in month in the cell according to date

    You can put this formula in B2:

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


    then copy down. Note that I have avoided using any of the ATP functions, for backwards compatibility.

    Hope this helps.

    Pete

  3. #3
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: display days in month in the cell according to date

    =day(eomonth(c2,0))

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: display days in month in the cell according to date

    If C2 is 1st of the month, as per your examples then you can get the number of days in that month with this formula

    =32-DAY(C2+31)

    format as general
    Audere est facere

  5. #5
    Registered User
    Join Date
    12-04-2012
    Location
    Fort Worth, TX
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: display days in month in the cell according to date

    Thank you so much! These will work great!

  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: display days in month in the cell according to date

    You're Welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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