Generating date from day, month year

N

Ned Harrison

Hello all,

Is there any way I can generate a date in one cell, from 3 other separate
cells - one each for day, month, year? i.e. if you enter (for example) '01'
in A1, 'September' in A2 and '2009' in A3, then in B1 it shows '01/09/2009'.
Alternatively, is there a way I can generate the month from the date - so if
you enter (for example) '01/09/2009' in A1, it shows 'September' in B1?
Many thanks in advance for your help,
N
 
J

JoeU2004

Ned Harrison said:
Is there any way I can generate a date in one cell, from 3 other separate
cells - one each for day, month, year? i.e. if you enter (for example)
'01'
in A1, 'September' in A2 and '2009' in A3, then in B1 it shows
'01/09/2009'.

I assume the apostrophes (single quotes) are not really in the cell. And I
assume you want the date value (number) 1/9/2009, not text. Try:

=--(A1&A2&A3)

formatted as Date or the custom format mm/dd/yyyy, depending on Regional and
Language settings.

On the off-chance that you want the text "01/09/2009", try:

=text(A1&A2&A3, "mm/dd/yyyy")

Alternatively, is there a way I can generate the month from the date - so
if
you enter (for example) '01/09/2009' in A1, it shows 'September' in B1?

=text(A1, "mmmm")
 
J

JP Ronse

Hi Ned,

For the date, try

=DATEVALUE(A1&"/"&A2&"/"&A3) with A1 = day, A2 = September, A3 = year

To get the month of a given date, try to format the cell: number, custom:
'mmmm' (without the quotes).

Wkr,

JP
 
J

Jacob Skaria

Col A Col B
1 =DATEVALUE(A1&"-"&A2&"-"&A3)
September =TEXT(B1,"mmmm")
2009

If this post helps click Yes
 

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