clelong

New Member
Joined
Oct 23, 2014
Messages
6
I had excell 2007 and i upgrade to 2016.
everything was working fine with 2007 and also excell 365
i have this nesting and how i can change to be able to used with excell 2016

=(IF(G3="STORAGE 1",".666666666",(IF(G3="STORAGE 2",".80",(IF(G3="TRANSPORTATION",".80",(IF(G3="STORAGE 1A",".66666666",(IF(G3="STORAGE 3",".771428571",(IF(G3="STORAGE 4",".753846154",(IF(G3="CONTAINER 20",".70",(IF(G3="CONTAINER 40",".70",(IF(G3="INCOMING 1",".90",(IF(G3="INCOMING 2",".90",(IF(G3="INCOMING 3",".90",(IF(G3="OUTGOING 1",".90",(IF(G3="OUTGOING 2",".90",(IF(G3="IMPORT FEE",".50"))))))))))))))))))))))))))))


thank you
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi clelong

Could you please define 'able to [be] used with excel 2016'? Your formula will function identically with both 2007 and 2016.

However, there is no value_if_false for the last logical test, so the formula will return FALSE if none of the previous logical tests are satisfied. This will be the case regardless whether 2007 or 2016 are used.

If you wish to change this, you will have to insert the value_if_false after the ".50" .

Cheers

pvr928
 
Upvote 0
Hi,

pvr is right, if your formula worked in 2007, it should work the same with 2016, so don't know what your trouble is.

You do; however, have logics in your formula that can be combined like this:


Book1
C
1NO MATCH
Sheet1
Cell Formulas
RangeFormula
C1=(IF(OR(G3={"STORAGE 1","STORAGE 1A"}),".666666666",IF(OR(G3={"STORAGE 2","TRANSPORTATION"}),".80",IF(G3="STORAGE 3",".771428571",IF(G3="STORAGE 4",".753846154",IF(OR(G3={"CONTAINER 20","CONTAINER 40"}),".70",IF(OR(G3={"INCOMING 1","INCOMING 2","INCOMING 3","OUTGOING 1","OUTGOING 2"}),".90",IF(G3="IMPORT FEE",".50","NO MATCH"))))))))


Please NOTE: all the values in your formula are surrounded by quotes (i.e. ".666666666", ".80", etc.), which makes them TEXT and not real numbers.
 
Upvote 0
with that many options, it would be better to create a VLOOKUP table than to cram it all into one (almost impossible to edit) formula.
 
Upvote 0
This kind of thing is why the LOOKUP functions exist. Deeply nesting IFs can be really confusing. Consider this alternative:

GHIJ
1STORAGE 10.666667
2STORAGE 20.8
3CONTAINER 20TRANSPORTATION0.8
40.7STORAGE 1A0.666667
5STORAGE 30.771429
60.7STORAGE 40.753846
7CONTAINER 200.7
8CONTAINER 400.7
9INCOMING 10.9
10INCOMING 20.9
11INCOMING 30.9
12OUTGOING 10.9
13OUTGOING 20.9
14IMPORT FEE0.5

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet7

Worksheet Formulas
CellFormula
G4=VLOOKUP(G3,I1:J14,2,FALSE)
G6=INDEX({0.666666666,0.8,0.8,0.666666666,0.771428571,0.753846154,0.7,0.7,0.9,0.9,0.9,0.9,0.9,0.5},MATCH(G3,{"STORAGE 1","STORAGE 2","TRANSPORTATION","STORAGE 1A","STORAGE 3","STORAGE 4","CONTAINER 20","CONTAINER 40","INCOMING 1","INCOMING 2","INCOMING 3","OUTGOING 1","OUTGOING 2","IMPORT FEE"},0))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



If you build a table like I1:J14, then you can use the simple formula in G4. Changing the values is just a matter of changing your table. The table can be hidden or on another sheet if you like.

If you really want it embedded in the formula, the G6 formula is still a bit simpler than your nested IF.

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

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