ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   creating a date column from seperate data (https://www.excelbanter.com/excel-worksheet-functions/61181-creating-date-column-seperate-data.html)

T.O.

creating a date column from seperate data
 

hi,
i have a very large table, in which the dates are represented by 3
seperate columns: year, month and day (all integers).
how can i use these 3 fields in a function (or macro) to create a
fourth column, containing the date in an excel date format?
i.e. if a line in my table looks like this: 1993 11 28
then i'd like to add a fourth column, reading: 11/28/1993

thanx.


--
T.O.
------------------------------------------------------------------------
T.O.'s Profile: http://www.excelforum.com/member.php...o&userid=29767
View this thread: http://www.excelforum.com/showthread...hreadid=494830


Roger Govier

creating a date column from seperate data
 
Hi
Try entering in cell D1
=DATE(YEAR(A1),MONTH(B1),DAY(C1))
Copy down as appropriate.

Regards

Roger Govier


T.O. wrote:
hi,
i have a very large table, in which the dates are represented by 3
seperate columns: year, month and day (all integers).
how can i use these 3 fields in a function (or macro) to create a
fourth column, containing the date in an excel date format?
i.e. if a line in my table looks like this: 1993 11 28
then i'd like to add a fourth column, reading: 11/28/1993

thanx.



T.O.

creating a date column from seperate data
 

the functions YEAR(), MONTH() and DAY() require a serial number,
representing a whole date as input.
any other ideas? please??


--
T.O.
------------------------------------------------------------------------
T.O.'s Profile: http://www.excelforum.com/member.php...o&userid=29767
View this thread: http://www.excelforum.com/showthread...hreadid=494830


Roger Govier

creating a date column from seperate data
 
My Apologies

I had meant to type just
=DATE(A1,B1,C1)
Format the cell in your desired date format

Regards

Roger Govier


T.O. wrote:
the functions YEAR(), MONTH() and DAY() require a serial number,
representing a whole date as input.
any other ideas? please??




All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com