Multiple dates in one cell...

mamma

New Member
Joined
Sep 29, 2011
Messages
5
Hi all,

I was wondering if you could help me out - I've searched the forums already and was unable to find exactly what I was looking for.

I have an action item log with a single "need date" column and then a column with the estimated completion date (ECD). Users only enter one date in the need date, but with the ECD, they sometimes enter multiple dates in the SAME cell if the ECD gets delayed, using strikeout on the old dates.

I would like to keep it simple and stay away from macros - just using conditional formatting and maybe an additional column for formulas if needed. Oh, and I am using Excel 2003

I want the ECD cell to turn red if the latest ECD is AFTER the "Need date".

Any help would be great! Thanks!!!!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
hi there, welcome to the boards. Is there a reason your users enter the new ECD date in the same cell as the old one? Perhaps it would make life easier if they entered amended ECDs in adjacent cells? Or even, over wrote the earlier ECD? this way, you could have simple conditional formatting do the work for you in highlighting the dates that are greater than the Need Date.

eg say your Need Date is column A, row 5:
you could apply cond format to B5 using the formula =IF($B$5>$A$5,1,0) and, selecting fill from the format button, choose red.

just a hint, when you post, you might want to let everyone know what version of excel you are using as this will help with the potential solution.

HTH, ajm
 
Upvote 0
Thank you for your response... I did actually say that I was using Excel 2003, but I guess it was buried later in my text.

Anyways, unfortunately I cannot keep people from entering multiple dates into the single cell and using strikeout. The manager in charge of the chart likes to see the history of date slides in that format. I know it would be way easier to do it that way...

So, if there is a way to find the maximum / latest date in a cell that has multiple dates within that cell - I guess that is what I am still looking for.

Thanks!!!

I should add that sometimes there is only one date, and sometimes there are multiple dates. I tried a formula that worked for only multiple dates, but when it came to a Single date in the cell, it stopped working.

The formula I tried to extract the latest date was as follows:
=IF(LEN(J178)<11,(J178),(RIGHT(J178,LEN(J178)-MAX(ROW(INDIRECT("1:"&LEN(J178)))*(MID(J178,ROW(INDIRECT("1:"&LEN(J178))),1)=CHAR(10))))))

I found it on another forum for a similar question - but didn't quite work...

(I added "IF(LEN(J178)<11" to try to apply the formula only to the cells with multiple dates... it didn't work)
 
Last edited:
Upvote 0
When they enter the multiple dates, do they use a consistant delimiter. Are they ALWAYS separated by a comma?

Strikethrough and other formatting is invisible to Excel formulas.
Unless there is a consistant format to the entered multiple dates (e.g. all in mm/dd/yyyy format, space separated, anything??)

Otherwise, VBA would be needed.
 
Upvote 0
They always use Alt Enter to go to the next line...

Also, they all use "/" in the dates... unfortunately, they sometimes use one digit for the month and day and sometimes use 2 digits
 
Upvote 0
How about this array formula:

Code:
=RIGHT(A1,1+LEN(A1)-MATCH(FALSE,ISERROR(DATEVALUE(MID(A1,1,1+LEN(A1)-ROW(INDIRECT("1:"&LEN(A1)))))),0))

edit: This doesn't work for all circumstances...
 
Last edited:
Upvote 0
Thanks - That kinda worked, but it still showed "#N/A" when there was only ONE date entered in the cell... also, it cut off some of the numbers from the dates...

Getting closer!
 
Upvote 0
I see that you want a formula solution and I imagine it can be done. Just in case...

Excel Workbook
AB
1Need DateECD
210/6/201110/3/201110/4/201110/05/2011
39/30/20119/5/201110/01/11
48/15/20118/16/2011
Sheet2


With CF formula like: =ISDATELATE(B2,A2)

In a Standard Module:
Rich (BB code):
Option Explicit
    
Function IsDateLate(CellECD As Range, CellNeedDate As Range) As Boolean
    
    If InStrRev(CellECD.Value, vbLf) Then
        If IsDate(Trim(Mid(CellECD.Value, InStrRev(CellECD.Value, vbLf) + 1))) Then
            If CDate(Trim(Mid(CellECD.Value, InStrRev(CellECD.Value, vbLf) + 1))) > CDate(CellNeedDate.Value) Then
                IsDateLate = True
            End If
        End If
    ElseIf IsDate(Trim(CellECD.Value)) Then
        If CDate(Trim(CellECD.Value)) > CDate(CellNeedDate.Value) Then
            IsDateLate = True
        End If
    End If
End Function
 
Upvote 0
thanks :) that works great... if it comes down to it, i'll let the spreadsheet owner know that the only way is to use VBA.

I am dealing with many very non-savvy excel users... so, if they can make it more difficult than it began and screw up the formatting or throw another wrench in it, they will. :-D
 
Upvote 0
You are most welcome. I do imagine a formula solution would work. I just don't know how to search through an unknown number of line feeds via worksheet functions.
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top