ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date Functions (https://www.excelbanter.com/excel-discussion-misc-queries/67130-date-functions.html)

KA Madrigal-Young

Date Functions
 
I need to come up with a way to take dates in one column (C), add a year, and
show the result in the next column(D). I've come up with the following
formula: =DATE(YEAR(C2)+2,MONTH(C2),DAY(C2)), which I've placed in my D
column (first row for dates). The formula itself works, but if I don't have
a number in a particular row in my C column (say, the next or 2nd row for
dates), I get a 1901 date or, sometimes, a #VALUE error. Is there a way add
2 years to a date in one column & show the result in the next column when
there is an entry to a row, but show a blank cell when the initial date is
blank?

Many thanks...

Heckuvaseeker

Date Functions
 


"KA Madrigal-Young" wrote:

I need to come up with a way to take dates in one column (C), add a year, and
show the result in the next column(D). I've come up with the following
formula: =DATE(YEAR(C2)+2,MONTH(C2),DAY(C2)), which I've placed in my D
column (first row for dates). The formula itself works, but if I don't have
a number in a particular row in my C column (say, the next or 2nd row for
dates), I get a 1901 date or, sometimes, a #VALUE error. Is there a way add
2 years to a date in one column & show the result in the next column when
there is an entry to a row, but show a blank cell when the initial date is
blank?

Many thanks...



All times are GMT +1. The time now is 07:16 AM.

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