View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Generating date from day, month year

"Ned Harrison" wrote:
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")