IF Function more than 64 levels of nesting

Ifthisthanthat

New Member
Joined
Mar 7, 2018
Messages
4
Hi all, newbie here, don't know what else to use besides IF function for this. Reaching nesting limit doing it this way. Any alternative ideas are appreciated!

Formula in B5 of image attached:

=IF((AND(C2=1.5,D2="L",H2=0.625)),'[1-MASTER.xls]A & LH SINGLE ROD END'!$M$10, (isolating this on one line so you can see it better)

IF((AND(C2=1.5,D2="L",H2=1)),'[1-MASTER.xls]A & LH SINGLE ROD END'!$M$11,IF((AND(C2=2,D2="L",H2=0.625)),'[1-MASTER.xls]A & LH SINGLE ROD END'!$M$12,IF((AND(C2=2,D2="L",H2=1)),'[1-MASTER.xls]A & LH SINGLE ROD END'!$M$13,IF((AND(C2=2,D2="L",H2=1.375)),'[1-MASTER.xls]A & LH SINGLE ROD END'!$M$14,IF((AND(C2=2.5,D2="L",H2=0.625)),'[1-MASTER.xls]A & LH SINGLE ROD END'!$M$15,IF((AND(C2=2.5,D2="L",H2=1)),'[1-MASTER.xls]A & LH SINGLE ROD END'!$M$16,IF((AND(C2=2.5,D2="L",H2=1.375)),'[1-MASTER.xls]A & LH SINGLE ROD END'!$M$17,IF((AND(C2=2.5,D2="L",H2=1.75)),'[1-MASTER.xls]A & LH SINGLE ROD, etc...., "ERROR")))

Logic in English, shown in "data" image attached: if cylinder's bore is 1.5", mount is "L" (or tie rod-column M), and rod diameter is .625", then "base price" is $223 (or $M$11).

In my case, for each mounting style (like the L mount), I have approximately 70 individual IF statements. From the sheet, you can see a lot of other mounting styles existing in the columns to the right of the "L" mounting style. I was going to do individual spreadsheets/pricing tools for each mounting style. Unless, whatever solution is suggested can accommodate much more date (IE approximately 70 individual statements multiplied by 16 mounting styles).

Thanks for any and all help!!!!!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
open
 
Upvote 0
Hi,

More than likely, with that many possible combinations, building a Table containing all the data, then use a much simpler formula to reference that Table for a result is the way to go. Probably end up using something like VLOOKUP, HLOOKUP, INDEX/MATCH, SUMPRODUCT, etc. after building the Table.
 
Upvote 0
If it was me, I might build my own User Defined Function to do something that complex.
I think they are so much easier to read and maintain that some monstrous, complex formula.
Of course, you have to be able to use VBA to go that route.
 
Upvote 0
Joe4... any good route to go out for hire on building a VBA tool like that? I don't know where to find a reliable Excel expert, but we would be willing to hire one for this project. Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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