Format a date

S

sacredarms

How can I format a date 01/01/05 to show up as Qrt1, 04/01/05 to show up as
Qrt2 and so on?
Any help appreciated.

Thanks
 
M

Max

Perhaps an alternative to try:

Assuming dates are in col A, A1 down

Put in B1:

=IF(A1="","",VLOOKUP(MONTH(A1),{1,"Qtr1";4,"Qtr2";7,"Qtr3";10,"Qtr4"},2)&",
"&TEXT(A1,"mm/dd/yy"))

Copy B1 down

Col B will display what you want
 
S

sacredarms

Thank you for the help. Much appreciated.

Max said:
Perhaps an alternative to try:

Assuming dates are in col A, A1 down

Put in B1:

=IF(A1="","",VLOOKUP(MONTH(A1),{1,"Qtr1";4,"Qtr2";7,"Qtr3";10,"Qtr4"},2)&",
"&TEXT(A1,"mm/dd/yy"))

Copy B1 down

Col B will display what you want
 
M

Max

Put in B1:
=IF(A1="","",VLOOKUP(MONTH(A1),{1,"Qtr1";4,"Qtr2";7,"Qtr3";10,"Qtr4"},2)&",
"&TEXT(A1,"mm/dd/yy"))

On 2nd reading, think the suggested formula was "overdone"
due to a slight over-interp of the orig. post <g>

It should have been just in B1:

=IF(A1="","",VLOOKUP(MONTH(A1),{1,"Qtr1";4,"Qtr2";7,"Qtr3";10,"Qtr4"},2))

to return just: "Qtr1" or "Qtr2", etc
 
Top