+ Reply to Thread
Results 1 to 4 of 4

Date handling

  1. #1
    Registered User
    Join Date
    03-23-2010
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    21

    Date handling

    Hi wondering if anyone can help me with what should be a simple formula but beyond me at the moment

    I have a cell lets say A1 with =today() which is fine

    Cell A2 contains =text(A1,"mmm-yy") which is fine to show current month in desired format

    Cell A3 contains =TEXT(TODAY()-DAY(TODAY()),"mmm-yy") which is fine to show month prior to current in desired format


    What i need to achieve is on a tracker (same worksheet) i have a planned finish date in cell H4 in following format "mmm-yy", i would like a cell next to (I4) it which does the following:-


    If H4 = A2 (current month) then text "Due this month" should appear in cell I4

    If H4 <= A3 (previous month) then text "Overdue" should appear in cell I4

    If H4 >A2 (current month) then text "On Track" should appear in cell I4

    If H4 is blank or any other value then "Enter PFD" should appear in cell I4

    Hope this makes sense and someone can assist.

    Much appreciated

    Jonny

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Date handling

    =If(H4 = A2,"Due this month",If(H4 <= A3,"Overdue",If(H4 >A2 ,"On Track","Enter PFD")))
    Click the * to say thanks.

  3. #3
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Date handling

    your text explanation is not enough to help you solve..
    So you have formula's that convert dates to text. The value in H4 is that a text as well?

    - if H4 is text you cannot compare texts as greater than or less than..
    - if H4 is a true datevalue you cannot compare it to dates presented as texts in A2 and A3

    Also is your current version still excel 2003? because if you use a later version then there are also some other dates formulas that can be used to solve your question
    To help you get to the desired end result we need an example file because the way the formula needs to be build depends on the true formatting of the text.

    Please see the yellow banner at the top on how to upload an example file..

  4. #4
    Registered User
    Join Date
    08-12-2019
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Date handling

    If you want to skip the formatting steps and keep the one reference cell, you can use this formula.

    Site is blocking my post, so I'm adding it as a picture.

    a.PNG

+ 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] Date handling from Userform to Excelsheet
    By rpjwhite in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2017, 09:22 AM
  2. Problem reading in text file handling date
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-22-2015, 11:52 AM
  3. Error handling inside error handling
    By grantastley in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-06-2015, 03:43 AM
  4. VBA Help with DATE Input Box & Error Handling
    By OxFACTOR in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-22-2014, 02:12 PM
  5. Sub handling in VBA
    By scudder12 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-07-2010, 04:44 AM
  6. [SOLVED] Handling #DIV/0!
    By Julie Parker in forum Excel General
    Replies: 13
    Last Post: 11-20-2009, 07:49 AM
  7. Error handling with a handling routine
    By ben in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-15-2005, 11:06 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