David
Alternatively, the formula per Mads¡¦ suggestion would be :-
=TEXT(B2,"mm/dd/yy") & " - " & TEXT(D2,"mm/dd/yy")
This formula has the advantage of being able to show the concatenated dates in whatever format is required.
TT
I've had this problem many times, and I have developed a somewhat awkward solution, but at least it works. The key is changing the date format to text but keeping the date intact.
If you know how to use VBA, here is what you can do. This code is to modify cell A1 that contains a date in the date format. You can modify the code to make it apply to your situation.
-Note- I use this in Excel 2000 - I don't know if it works in older versions.
----------
Sub date_to_text()
Range("a1").NumberFormat = "m/d/yy"
date_txt = range("a1").value
Range("a1").NumberFormat = "@"
Range("a1").Value = date_txt
End Sub
-Mike
Assuming your date is in cell A1, to return dd/mm/yy use the following in your formula :-
TEXT(A1,"dd/mm/yy")
mads
Mike
Taking this one step further, the following macro will toggle the selected cells between date and text formats :-
Sub Toggle_Date_Text()
For Each cell In Selection
If cell.NumberFormat = "m/d/yy" Then
date_txt = cell.Value
cell.NumberFormat = "@"
cell.Value = date_txt
Else
txt_date = cell.Value
cell.NumberFormat = "m/d/yy"
cell.Value = txt_date
End If
Next
End Sub
Ada
I had the same problem trying to concatenate two dates I did this.
I used MONTH(B2),"/",DAY(B2)
or my total formula was =CONCATENATE(MONTH(B2),"/",DAY(B2),"/00 - ",MONTH(D2),"/",DAY(D2),"/00")