ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   working with dates in excel (https://www.excelbanter.com/excel-worksheet-functions/192338-working-dates-excel.html)

boschuster50

working with dates in excel
 
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)","YE AR(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

Max

working with dates in excel
 
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)))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"boschuster50" wrote:
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)","YE AR(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


boschuster50

working with dates in excel
 
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.

"Max" wrote:

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)))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"boschuster50" wrote:
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)","YE AR(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


Max

working with dates in excel
 
Welcome. Do click the "Yes" button below, won't you? Greatly enhances thread
longevity.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"boschuster50" wrote:
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.




All times are GMT +1. The time now is 02:59 PM.

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