ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   converting to regular date format (https://www.excelbanter.com/excel-discussion-misc-queries/188481-converting-regular-date-format.html)

Freida

converting to regular date format
 
I have 3 columns containing month (entered as january, february,etc), day of
month, year(2007,2008,etc). I would like to create a column with the date in
regular date format (2/1/07).
Do I have to use some form of VLOOKUP together with the DATE function?


Gary''s Student

converting to regular date format
 
In cell D1 enter:
=DATEVALUE(B1 & A1 & C1)
and format as date
--
Gary''s Student - gsnu200787


"Freida" wrote:

I have 3 columns containing month (entered as january, february,etc), day of
month, year(2007,2008,etc). I would like to create a column with the date in
regular date format (2/1/07).
Do I have to use some form of VLOOKUP together with the DATE function?


JLatham

converting to regular date format
 
I believe that Gary''s Student's response is probably the simplest and
easiest way to do this. But I'll offer another way just because sometimes
options are nice to have.

Begin by creating a list of months. I put mine in J1:J12. Spell the months
as you will in your months column. Then in the column where you want to show
the date as a date, use this formula (assumes we're working in row 1)

=DATE(C1,MATCH(B1,J$1:J$12,0),A1)

I think this is the kind of thing you had in mind that led you to the
VLOOKUP() part of your question. VLOOKUP() isn't needed, the MATCH()
accomplishes the same thing using only 1 column instead of 2. But again,
Gary''s Student's response is much more straight forward and probably more
understandable when you come back to see what it does later, plus doesn't
require the extra column of data.

"Freida" wrote:

I have 3 columns containing month (entered as january, february,etc), day of
month, year(2007,2008,etc). I would like to create a column with the date in
regular date format (2/1/07).
Do I have to use some form of VLOOKUP together with the DATE function?


Freida

converting to regular date format
 
Cool. I used Gary's straightforward method. But I appreciate the extra
knowledge you provided me with, JL. You guys are great. Thanx


All times are GMT +1. The time now is 09:27 PM.

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