Having issues with nested formulas

snm6996

New Member
Joined
Apr 25, 2019
Messages
2
I have a spreadsheet to determine the number of hours a machine worked from one month to the next based on meter readings. However, if a meter reading wasn't entered for a month (total of zero), I need the formula to go back each month until it finds a month where the meter reading is greater than zero.
My spreadsheet is for a year, so there is a possible 12 ifs for the formula to go through.
This is my formula for April and I need it to go to December (cell DV3)
=(IF(AND(AS3=0),0,IF(AND(AI3>0),AS3-AI3,IF(AND(AI3=0),IF(AND(AI3>0),AS3-Y3,AS3-U3))))))
What is the best way to do this?
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
you forgot about condition
Code:
=IF(AS3=0,0,IF(AI3>0,AS3-AI3,IF(AI3=0,[B][COLOR="#FF0000"]???[/COLOR][/B],IF(AI3>0,AS3-Y3,AS3-U3))))
and it looks much simpler without AND()

for the rest I do not know what you want to achieve (maybe someone else)
Show source (raw data)
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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