Nested if or function

drluke

Active Member
Joined
Apr 17, 2014
Messages
314
Office Version
  1. 365
Platform
  1. Windows
I have a nested IF OR formula, but both of the criteria to evaluate has the same result. My formula is:

=IF(OR($A$4<>"D",$A$4=$D$3),IF(INDEX(DATA!$A$11:$P$89,MATCH($A76,DATA!$A$11:$A$89,0),1)=$A76,OFFSET(DATA!$P80,0,
(-DATA!$P$8)),"Error"),IF(INDEX(DATA!$A$11:$P$89,MATCH($A76,DATA!$A$11:$A$89,0),1)=$A76,OFFSET(DATA!$P80,0,(-DATA!$P$8))
,"Error"))

<colgroup><col width="64" style="width: 48pt;"> <col width="76" style="width: 57pt; mso-width-source: userset; mso-width-alt: 2779;"> <col width="62" style="width: 47pt; mso-width-source: userset; mso-width-alt: 2267;"> <col width="64" style="width: 48pt;" span="2"> <col width="77" style="width: 58pt; mso-width-source: userset; mso-width-alt: 2816;"> <col width="64" style="width: 48pt;" span="3"> <col width="55" style="width: 41pt; mso-width-source: userset; mso-width-alt: 2011;"> <col width="64" style="width: 48pt;"> <col width="101" style="width: 76pt; mso-width-source: userset; mso-width-alt: 3693;"> <col width="64" style="width: 48pt;" span="6"> <col width="152" style="width: 114pt; mso-width-source: userset; mso-width-alt: 5558;"> <col width="64" style="width: 48pt;" span="2"> <tbody> </tbody>

The formula works ok, but as both options for A4 has the same result, is there a way I can shorten this formula and
make it less complex?
<colgroup><col width="64" style="width: 48pt;"> <tbody> </tbody>
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi,

You don't need the duplicated 2nd half of the formula, try it like this:

=IF(OR($A$4<>"D",$A$4=$D$3),IF(INDEX(DATA!$A$11:$P$89,MATCH($A76,DATA!$A$11:$A$89,0),1)=$A76,OFFSET(DATA!$P80,0,(-DATA!$P$8)),"Error"),"Error")
 
Upvote 0

Forum statistics

Threads
1,214,403
Messages
6,119,308
Members
448,886
Latest member
GBCTeacher

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