+ Reply to Thread
Results 1 to 9 of 9

Complex Number of Days in a Month Formula

  1. #1
    Registered User
    Join Date
    02-19-2024
    Location
    Dublin
    MS-Off Ver
    2016
    Posts
    23

    Complex Number of Days in a Month Formula

    Hi

    My formula written down on cell L26 should be on L24.

    Each individual IF is workings as it should, but when nested, the formula does not work.
    Attached Files Attached Files
    Last edited by ClericalOfficer; 03-06-2024 at 07:03 AM.

  2. #2
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Complex Number of Days in a Month Formula

    Try this:

    =IF(D21="New Hire",DAYS(EOMONTH(D22,0),D22)+1,IF(AND(D21="LEAVER",EOMONTH(D22,-1)+1=D22),1,IF(D21="LEAVER",DAY(EOMONTH(D22,0)+1-DAY(EOMONTH(D22,0)-D22+1)),IF(AND(D21="INCREMENT",EOMONTH(D22,-1)+1=D22),0,IF(D21="INCREMENT",DAY(EOMONTH(D22,0)-1-DAY(EOMONTH(D22,0)-D22)))))))
    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.

  3. #3
    Registered User
    Join Date
    02-19-2024
    Location
    Dublin
    MS-Off Ver
    2016
    Posts
    23

    Re: Complex Number of Days in a Month Formula

    AliGW, perfect! Thanks.

    Was the issue an extra bracket and a few missing ones?

  4. #4
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Complex Number of Days in a Month Formula

    Yes, there or thereabouts. I used the colour coding and function assist in the formula bar to track them down.

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  5. #5
    Registered User
    Join Date
    02-19-2024
    Location
    Dublin
    MS-Off Ver
    2016
    Posts
    23

    Re: Complex Number of Days in a Month Formula

    I have added reputation, where does it show?

  6. #6
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Complex Number of Days in a Month Formula

    Only for the recipient - thank you!

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Complex Number of Days in a Month Formula

    Could you please mark the thread as solved, as requested?

  8. #8
    Registered User
    Join Date
    02-19-2024
    Location
    Dublin
    MS-Off Ver
    2016
    Posts
    23

    Re: Complex Number of Days in a Month Formula

    I think it is marked as solved, no?

  9. #9
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Complex Number of Days in a Month Formula

    It is now. Thanks!

+ 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. [SOLVED] Help with formula that calculates the days remaining in the month plus a number
    By Paradigmgaming911 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-04-2023, 09:41 PM
  2. [SOLVED] Formula for Number of Days in a Month So Far + Decimal for Partial Days
    By ExcelNewb99 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-02-2023, 09:07 PM
  3. [SOLVED] Number of days passed in given month formula
    By major al in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-08-2023, 12:07 PM
  4. Formula to Calculate number of days in Corresponding Month/Year
    By watson150 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2022, 08:41 PM
  5. Formula accomodating for the different number of days in a month
    By Coyote_e in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-20-2019, 07:53 AM
  6. Looking for help with excel formula to determine number of days in a month
    By sallysebern in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-11-2017, 03:44 PM
  7. [SOLVED] Formula to get number of days in a month
    By rizmomin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-18-2017, 11:12 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