If, and, or

littlevic

New Member
Joined
Jan 14, 2011
Messages
12
hey wondered if anyone can help me.

I have a financial model based on life expentancy of e.g. boilers, it runs from 2012 to 2022

Boiler lives for 5 years so will need replacing 5 years after istall + then again after 5 years + again if it is not going to last for 5 years after 2022

Basically I need the cost of replacement to appear in columns headed with years 2012 through 2022 probably more than once

I did a nested if statement but that did not work and then tried this but obvioulsy it's wrong and my excel skills are getting abit rusty now:

IF($N$4=$J11,$H11,AND(IF($N$4=$K11,$H11,AND(IF($N$4=$L11,$H11,0)))))

N4 = year 2012 (m4 = 2013 etc)
H11 = cost of replacement
J11 = first replacement date
K11 = second replacement date
L11 = third replacement date

if there is no spend in that year I need the formula to return £0.00

Ideally I also need something to say if third replacement date is less than 5 years from 2022 then to add H11 cost of replacement into 2022 column

Can anyone help? :)

thanks for reading
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,224,504
Messages
6,179,142
Members
452,892
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top