working with dates in excel

B

boschuster50

I previously posted a question.

I have column A with dates, column B with different dates...
My formula in column C:
=IF(B1<=TODAY(),"YEAR(B1)+1,MONTH(A1),DAY(A1)","YEAR(B1),MONTH(A1),DAY(A1)")

The problem is that the result in C is showing:
YEAR(B1)+1,MONTH(A1),DAY(A1), or the other if the date is after today.
instead of the actual date, which is what I need. mm/dd/yyyy

Is there something I'm leaving out?

This is driving me nuts!
Please, Please, Please, Please, Thank you, Thank you, Thank you, Thank you
 
M

Max

Is there something I'm leaving out?
On the face of it, believe it's the DATE function ..

Try it as:
=IF(B1<=TODAY(),DATE(YEAR(B1)+1,MONTH(A1),DAY(A1)),
DATE(YEAR(B1),MONTH(A1),DAY(A1)))
 
B

boschuster50

Thank you so much! That did it. You are a genius!
This has been driving me nuts for a couple of days now.
Thank you again.
 
M

Max

Welcome. Do click the "Yes" button below, won't you? Greatly enhances thread
longevity.
 

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

Top