ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   add years to a cell (https://www.excelbanter.com/excel-programming/440194-add-years-cell.html)

SLP

add years to a cell
 
Hi,

I have a formula to which I need to add 5, 10, 15, and 20 years to cell H5.
Hope someone can help me our as I can't figure it out. Thanks much!

=ROUND(IF(AND(EmployeeData!$H5<G$4,EmployeeData!$H 5=F$4),IF(YEAR(G$4)-YEAR(EmployeeData!$F5)=5,EmployeeData!$O5*Employee Data!AM5*ProgramOverview!$AR5,IF(YEAR(G$4)-YEAR(EmployeeData!$F5)=10,EmployeeData!$O5*Employe eData!AM5*ProgramOverview!$AR5,IF(YEAR(G$4)-YEAR(EmployeeData!$F5)=15,EmployeeData!$O5*Employe eData!AM5*ProgramOverview!$AR5,IF(YEAR(G$4)-YEAR(EmployeeData!$F5)=20,EmployeeData!$O5*Employe eData!AM5*ProgramOverview!$AR5,0)))),0),2)

Rick Rothstein

add years to a cell
 
I'm confused by the formula you posted. It *looks* like you are returning
the same value, namely this...

EmployeeData!$O5*EmployeeData!AM5*ProgramOverview! $AR5

no matter if the difference in years is 5, 10, 15 or 20. and this returned
value has nothing to do with cell H5. Can you clarify please.

--
Rick (MVP - Excel)


"SLP" wrote in message
...
Hi,

I have a formula to which I need to add 5, 10, 15, and 20 years to cell
H5.
Hope someone can help me our as I can't figure it out. Thanks much!

=ROUND(IF(AND(EmployeeData!$H5<G$4,EmployeeData!$H 5=F$4),IF(YEAR(G$4)-YEAR(EmployeeData!$F5)=5,EmployeeData!$O5*Employee Data!AM5*ProgramOverview!$AR5,IF(YEAR(G$4)-YEAR(EmployeeData!$F5)=10,EmployeeData!$O5*Employe eData!AM5*ProgramOverview!$AR5,IF(YEAR(G$4)-YEAR(EmployeeData!$F5)=15,EmployeeData!$O5*Employe eData!AM5*ProgramOverview!$AR5,IF(YEAR(G$4)-YEAR(EmployeeData!$F5)=20,EmployeeData!$O5*Employe eData!AM5*ProgramOverview!$AR5,0)))),0),2)




All times are GMT +1. The time now is 03:02 AM.

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