Joining dates and text in formula

R

RJS

Hi,

I have a simple formula which is joins 2 dates. To demonstrate

Cell D17 = 1/1/07
Cell E17 = 8/1/07

When I join them using the formula "=D17&" to "&E17" the date formats
aren't retained and I get the answer "39083 to 39090". The cell has
date format set.

How do I get the cell to return "1st Jan 07 to 8th Jan 07"?

Thanks
 
G

Gary''s Student

Use the text function:

=TEXT(D17,"d mmm yy") & " to " & TEXT(E17,"d mmm yy")


but notice no "st" or "rd", etc.
 
G

Gord Dibben

Just a late note here.

If you did want the "st" or "rd" eyc. you could employ a user defined function
to provide those.

Post back if interested.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top