Formula simplification

Polanskiman

Board Regular
Joined
Nov 29, 2011
Messages
119
Office Version
  1. 365
  2. 2016
  3. 2011
  4. 2010
  5. 2007
Platform
  1. Windows
  2. MacOS
  3. Mobile
Hello,

I need some help in simplifying 3 formulas. Here they are:

=IF(C6<>"Tank Dimensions","",IF(OR(AND(C16="No",D23=""),AND(C16="No",D23<>""),AND(C16="Partially",D23=""),AND(C16="Yes 100%",D23<=""),AND(C16="partially",D19="")),"",IF(AND(C16="Yes 100%",D23=""),"",D13/(D11-($D$12/10))*((D11-($D$12/10))-(D23-($D$12/10))))))

and

=IF(AND(C16="yes 100%",D19<>"",D23<>""),D19-($D$12/10),IF(OR(C6<>"Tank Dimensions",C16="<please select>",AND(C6="tank dimensions",COUNTIF(D9:D12,"")),AND(C16="yes 100%",D23<>"")),0,IF(D19=0,0,D19-($D$12/10))))

and

=IF(AND(C6="tank dimensions",COUNTIF(D9:D12,"")),0,IF(AND(C16="yes 100%",D19<>""),(D19-($D$12/10)),IF(OR(C6="<please select>",C16="<please select>",C16="no",AND(C16="partially",D19=""),AND(C16="yes 100%",D23<>"")),0,IF(OR(D23=0,K36>0),0,(D23-($D$12/10))))))

All these nested IF, AND, OR are driving me crazy. In principle they work as they should yet I can't help to think that there must be a way to simplify them.

I would have attached the worksheet where these 3 formulas are set into context (cell D24, F36 and I36) but it doesn't seem possible to attach files. I tried using the xl2bb Add-in but it doesn't seem to be working as expected. When I preview the post part of the selection made is clipped.

Any help would be appreciated.
 
Any other improvement on the other 2 formulas possible?
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
The bit in red also seems redundant
=IF(C6<>"Tank Dimensions","",IF(OR(AND(C16="No",D23=""),AND(C16="No",D23<>""),AND(C16="Partially",D23=""),AND(C16="Yes 100%",D23<=""),AND(C16="partially",D19="")),"",IF(AND(C16="Yes 100%",D23=""),"",D13/(D11-($D$12/10))*((D11-($D$12/10))-(D23-($D$12/10))))))
Yes. You are definitely right. Thank you.

So far the formula is looking like this now:

=IF(C6<>"Tank Dimensions","",IF(OR(C16="No",AND(C16="Partially",D23=""),AND(C16="Yes 100%",D23<>""),AND(C16="partially",D19="")),"",D13/(D11-($D$12/10))*((D11-($D$12/10))-(D23-($D$12/10)))))
Actually I just looked back and there was an error. The D23<="" was wrong. It should have been D23<>"". Therefore the formula can be simplified even further as such:

=IF(C6<>"Tank Dimensions","",IF(OR(C16="No",C16="Yes 100%",AND(C16="Partially",D23=""),AND(C16="partially",D19="")),"",D13/(D11-($D$12/10))*((D11-($D$12/10))-(D23-($D$12/10)))))
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,533
Members
448,969
Latest member
mirek8991

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