+ Reply to Thread
Results 1 to 9 of 9

If formula issue with date

  1. #1
    Registered User
    Join Date
    12-29-2017
    Location
    UK
    MS-Off Ver
    365
    Posts
    32

    Question If formula issue with date

    Dear Excel Experts,
    Greetings,

    Kindly appreciate your help with a formula that allow me to compare an IF formula with Today Date, for more info. kindly check the attached file or check the link below.
    https://ufile.io/msot6r41
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: If formula issue with date

    Hi there,

    I may have misunderstood your requirements, but try entering the following formula in Cell D2 and copying it downwards:

    Please Login or Register  to view this content.
    The formula calculates the last day of the month for the date specified in Cell C2, and displays the "Will expire" message if the last day of that month is one day before the date specified in Cell J3.

    You'll need to enhance the formula if there's a possibility that "whatever it is" has already expired.


    Hope this helps.

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    12-29-2017
    Location
    UK
    MS-Off Ver
    365
    Posts
    32

    Re: If formula issue with date

    not working as expected Greg M.. kindly read my attachment
    its close to this formula but i need to fix it
    =IFERROR(IF(DATE(RIGHT(Y10;17);MID(Y10;5;2);LEFT(Y10;0))<=DATE(RIGHT($Y$6;4);MID($Y$6;3;2);LEFT($Y$6+0));$B3;"");"")

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,540

    Re: If formula issue with date

    The formula in post #3 doesn't seem to relate to the file in post #1 as there is nothing in column Y in the file.
    Perhaps the better strategy would be to manually show the expected results, I assume in column D, so that we have something with which to compare the output of our proposed formulas/code.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    12-29-2017
    Location
    UK
    MS-Off Ver
    365
    Posts
    32
    Quote Originally Posted by JeteMc View Post
    The formula in post #3 doesn't seem to relate to the file in post #1 as there is nothing in column Y in the file.
    Perhaps the better strategy would be to manually show the expected results, I assume in column D, so that we have something with which to compare the output of our proposed formulas/code.
    Let us know if you have any questions.
    In the formula i added you can change Y10 to C2 while the formula will be added and start from D2..
    THANKS ALOT FOR YOUR HELP

  6. #6
    Registered User
    Join Date
    12-29-2017
    Location
    UK
    MS-Off Ver
    365
    Posts
    32

    Re: If formula issue with date

    Need to fix and organize the date (month and year) from the text in this formula

    =iferror(if(date(right(c2;17);mid(c2;5;2);left(c2;0))<=date(right($y$6;4);mid($y$6;3;2);left($y$6+0));$b3;"");"")

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,540

    Re: If formula issue with date

    Since the date in cell J3 includes the day I feel that the formula in column D that references the dates in column C should include days also.
    Here is a modification of the formula from post #6 that returns all of the names in column B: =IFERROR(IF(DATE(LEFT(C2;4);MID(C2;9;2);MID(C2;6;2))<=J$3;B2;"");"")
    The date in J3 is June 1, 2026, if the day from is not important then the formula could be written: =IFERROR(IF(DATE(LEFT(C2;4);MID(C2;9;2);1)<=J$3;B2;"");"")
    It would be helpful to know what is expected to be in cell D2:D6.

  8. #8
    Registered User
    Join Date
    12-29-2017
    Location
    UK
    MS-Off Ver
    365
    Posts
    32

    Re: If formula issue with date

    Quote Originally Posted by JeteMc View Post
    Since the date in cell J3 includes the day I feel that the formula in column D that references the dates in column C should include days also.
    Here is a modification of the formula from post #6 that returns all of the names in column B: =IFERROR(IF(DATE(LEFT(C2;4);MID(C2;9;2);MID(C2;6;2))<=J$3;B2;"");"")
    The date in J3 is June 1, 2026, if the day from is not important then the formula could be written: =IFERROR(IF(DATE(LEFT(C2;4);MID(C2;9;2);1)<=J$3;B2;"");"")
    It would be helpful to know what is expected to be in cell D2:D6.
    thanks alot bro, it works

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,540

    Re: If formula issue with date

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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. Excel date formula issue
    By Caveroni in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-22-2021, 02:22 PM
  2. [SOLVED] date formula issue
    By Tony0731 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-22-2018, 10:03 AM
  3. [SOLVED] date formula issue
    By Tony0731 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-21-2018, 11:57 AM
  4. date to formula issue
    By Todd6262 in forum Excel General
    Replies: 5
    Last Post: 11-28-2016, 04:25 PM
  5. Date Issue using a formula
    By Cremorneguy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-06-2014, 02:24 AM
  6. [SOLVED] Use formula to get date format issue
    By spacle in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-26-2013, 03:47 PM
  7. IF= formula date issue
    By jendew in forum Excel General
    Replies: 13
    Last Post: 05-12-2008, 03:17 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