• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

How combine dates in a cell

I have 4 cells for examlpe that have dates in them like...
6/14/2011      6/15/2011      6/16/2011      6/17/2011

In a 5th cell I want to use the 1st cell from above and the last cell from above and make it say...

"6/14/2011 - 6/17/2011"  (without the quote marks).

How can I do this?

--Steve
0
SteveL13
Asked:
SteveL13
  • 4
  • 3
  • 3
  • +4
1 Solution
 
zorvek (Kevin Jones)ConsultantCommented:
=A1+" - "+D1

Kevin
0
 
nutschCommented:
Assuming your dates are in a1 through D1
=text(a1,"mm/dd/yyy") & " - " & text(d1,"mm/dd/yyy")

Thomas
0
 
zorvek (Kevin Jones)ConsultantCommented:
Sorry, I'm working in C# right now ;-)

=A1&" - "&D1

Kevin
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
zorvek (Kevin Jones)ConsultantCommented:
I also just realize that the date format in the source cell is NOT copied so use Thomas's solution.

Kevin
0
 
SteveL13Author Commented:
None of these work so far.
0
 
zorvek (Kevin Jones)ConsultantCommented:
Did you try Thomas's solution? It works at my house.

Make sure the cell references match your own.

Kevin
0
 
rspahitzCommented:
=MONTH(A1)&"/" & DAY(A1)&"/"&YEAR(A1) & " - " & MONTH(D1)&"/" & DAY(D1)&"/"&YEAR(D1)
0
 
nutschCommented:
see attached file for use in action:

Thomas
datefile.xls
0
 
ssisworoCommented:
TRY This :
 
= CONCATENATE(TEXT(A1,"m/d/yyyy")," - ",TEXT(D1,"m/d/yyyy"))

 preview
0
 
rspahitzCommented:
Steve, what message do you get when you try nutsch's proposed solution? (or the others)?
0
 
SteveL13Author Commented:
So far nothing has worked.  Just for reference my cells are D4 and G4.  I've altered the suggestions accordingly.  The error I get is #Value!

One other comment... the cell I'm putting these attempted formulas into is a merged "bunch" of cells from D23 to G23.  I don't know if that matters or not.

????
0
 
SteveL13Author Commented:
I think I have found a clue but still don't know what to do about it.  The problem is, cells D4 and G4 are formula cells like....   =WORKDAY(E4, -1, Holidays)

0
 
rspahitzCommented:
just as a test, try this: set H4 formula to =G4

If that works, try =D4; if that works, try =D4&G4

If you don't get a date or number, your problem is in the original cells.

BTW  =D4&G4    should always work (to give you something that's not an error) if you see non-error values in D4 and H4 so that would indicate to me that you might be using the wrong symbol or (if copying) that you are copying something that is collecting some hidden "garbage".
0
 
patrickabCommented:
if tht dates are in one cell in one long string, just use. ALT+Enter betweeen each pair of dates.
0
 
barry houdiniCommented:
Hello Steve, it shouldn't matter whether the dates are just input or returned by a formula

If WORKDAY function gives the dates then they must be real dates so TEXT function should work. I used this formula in a merged cell and it worked fine

=TEXT(D4,"m/d/yyyy")&" - "&TEXT(G4,"m/d/yyyy")

If that doesn't work for you then it may be because of regional variations in the TEXT function, do you have non US regional settings? If so then you might have to adjust the "m/d/yyyy" part in the TEXT function to account for language differences....otherwise this workaround should work whatever your regional settings:

=MONTH(D4)&"/"&DAY(D4)&"/"&YEAR(D4)&" - "&MONTH(G4)&"/"&DAY(G4)&"/"&YEAR(G4)

regards, barry
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 3
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now