creating a date using data from multiple fields

sgthammers

New Member
Joined
May 25, 2006
Messages
4
Hello.

I need to fill a date entry with values from three fields.

The Result needs to be in yyyymmdd format, with the three feeder fields listing the yyyy, mm, dd values as four or two character fields respectively (I need the date to show 8 characters).

For example, I enter:

02 (in the month field)
01 (in the day field)
2007 (in the year field)

and get 20070201 in the date field. Any suggestions?

Thanks for the help!
 

Some videos you may like

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Try, eg:

=A3&TEXT(A1,"00")&TEXT(A2,"00")

or:

=DATE(A3,A1,A2)

formatted as yyyymmdd for a true serial date.
 

Watch MrExcel Video

Forum statistics

Threads
1,114,398
Messages
5,547,729
Members
410,810
Latest member
lilwayne
Top