Date Formatting

  • Thread starter Thread starter teeb
  • Start date Start date
T

teeb

I'm trying to condense two columns of data into one clumn that has
date

In column A is a number between 1 and 365 respresenting the day an
month and in column B is a number (3 digits) that respresents the year
201 is 2001 and 198 is 1998.

How can I get these to show the correct date in 1 cell?

Cheers Tee
 
Hi

Try this:
=IF(B1>199,DATE(LEFT(B1,1)&"0"&RIGHT(B1,2),1,A1),DATE(LEFT(B1,1)&"9"&RIGHT(B1,2),1,A1))

Hope this helps.
Andy.
 
=DATE(B1+1800,1,A1)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Well, to be fair, yours is only about 40 characters less than mine, does not
includes an IF, or any LEFTs or RIGHTs. There's not much in it apart from
that!

Andy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top