Nesting IF

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I have 4 formulas that work independently. Two are similar to the other two in what they look for. I'm trying to put them all into one formula. How do I nest them so that if Excel finds #1 , it doesn't look for #2 , and if it finds #3 it doesn't look for #4 ? It would never find #1 and #3 at the same time, nor will it ever find #2 and #4 at the same time, because B2 will only be either "H" or "V" and C2 will only be Zinc or our standard material.

#1 is (=IF(AND(B2="H",$C$2="ZINC"),(COUNTIF('EDGES & BEND ALLOWANCE'!$AA$2:$AA$318,E2)>0)))
#2 is (=IF(B2="H",(COUNTIF('EDGES & BEND ALLOWANCE'!$Y$2:$Y$318,E2)>0)))
#3 is (=IF(AND(B2="V",$C$2="ZINC"),(COUNTIF('EDGES & BEND ALLOWANCE'!$AC$2:$AC$318,E2)>0)))
#4 is (=IF(B2="V",(COUNTIF('EDGES & BEND ALLOWANCE'!$Z$2:$Z$305,E2)>0)))

On a side note, where would I find classes on this stuff so I'm not always harassing you fine people?
 
Last edited:

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
They are fairly simple to build. Click the 2nd formula. In the formula bar highlight the formula not including the = sign. Press CTRL-C then ESC key. Now click into your 1st formula immediately after the IF. Click the fx button next to the formula bar. A dialog box appears. You will see you have no false argument. Click into the false box and press CTRL-V. Press enter and agree with excel correcting the formula. There you have nested the 2nd formula into the first. Repeat but this time click into the formula immediately after the 2nd IF. You will know you are right because the IF will have no false argument.
 
Upvote 0
Cool! Thanks! That enabled me to nest those two. How to I merge the two nested ones I just created so I have one formula?
 
Upvote 0
So you have nested the 2nd one into the first one? Yes? So click into that formula. Click after the 2nd IF. Click the fx button. The false part should again be empty. So you just need to copy the formula required to be pasted into here like you did before.
 
Upvote 0
Sweet! Thank you! I appreciate you telling me how to do it myself instead of relying on someone else! :biggrin:
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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