If Statements

kcdill

Board Regular
Joined
Mar 13, 2002
Messages
106
Question 1. How can I make this thing shorter?

=IF((G106*H106)>900,"Special",IF(VesselID,SETV(IF(D106=20,VLOOKUP((G106*H106),CoverRingFlangeThickness,2,TRUE),IF(D106=24,VLOOKUP((G106*H106),CoverRingFlangeThickness,4,TRUE),IF(D106=30,VLOOKUP((G106*H106),CoverRingFlangeThickness,6,TRUE),IF(D106=36,VLOOKUP((G106*H106),CoverRingFlangeThickness,8,TRUE),"Size?")))))+Summary!$D$9,GETV()))

Question 2. Can I add another If Statement for an 18” flange? such as IF(D106=18,VLOOKUP((G106*H106),CoverRingFlangeThickness,2,TRUE). I tried the formula below and get error messages. Do I have too many Ifs?

=IF((G106*H106)>900,"Special",IF(VesselID,SETV(IF(D106=18,VLOOKUP((G106*H106),CoverRingFlangeThickness,2,TRUE),IF(D106=20,VLOOKUP((G106*H106),CoverRingFlangeThickness,4,TRUE),IF(D106=24,VLOOKUP((G106*H106),CoverRingFlangeThickness,6,TRUE),IF(D106=30,VLOOKUP((G106*H106),CoverRingFlangeThickness,8,TRUE),IF(D106=36,VLOOKUP((G106*H106),CoverRingFlangeThickness,10,TRUE),"Size?"))))))+Summary!$D$9,GETV()))
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Well as to the second Question...you can only nest 7 IF() in a formula. You may try adding OR(), AND() to the IF() statements.
As to the first Question I think if you post some more info , like what the Data looks like, the formula could probably be shortened and changed.
:biggrin:
PAul
 
Upvote 0
i'm sure there's a formula solution to your quandry here. just post a little more info on what's in D106, G106 & H106; what are your requirements, and the desired outcome. maybe w/ HTML maker.
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,666
Members
448,977
Latest member
moonlight6

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