No ifs, ands, or buts about it

Status
Not open for further replies.

MrDB4Excel

Active Member
Joined
Jan 29, 2004
Messages
334
Office Version
  1. 2013
Platform
  1. Windows
Yes, no ifs, ands, or buts about it; this is too many ifs in one formula.
=IF(F4=$S$2,$Q$3,IF(F4=$S$3,$Q$4,IF(F4=$S$4,$Q$5,IF(F4=$S$5,$Q$6,IF(F4=$S$6,$Q$7,IF(F4=$S$7,$Q$8,IF(F4=$S$8,$Q$9,IF(F4<>$S$2,$S$9,IF(F4<>$S$3,$S$9,IF(F4<>$S$4,$S$9,IF(F4<>$S$5,$S$9,IF(F4<>$S$6,$S$9,IF(F4<>$S$7,$S$9,IF(F4<>$S$8,$S$9,IF(F4=$S$9,$S$10)))))))))))))))
There has got to be a way of making this simpler.
Notice that F4 can be = to several data points: S2, S3, S4, S5, S6, S7, and S8. One would think surely there has to be a method to check how F4 is equal to so many cells and yet be able to return the value from Q3, Q4, Q5, Q6, Q7, Q8, or Q9 that is dependent upon the values in S2, S3, S4, S5, S6, S7, or S8.
Totally confusing why this IF formula has to be so long to arrive at such simple answers. And the S2, S3, S4, S5, S6, S7, and S8 aren't the end of this formula. Just look at the rest of it: F4 being <> to S2, S3, S4, S5, S6, S7, and S8 and return a value that is based upon S9.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Status
Not open for further replies.

Forum statistics

Threads
1,214,905
Messages
6,122,172
Members
449,071
Latest member
cdnMech

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