Multiple IF functions, differant range requires differant calculation

Spoontang

New Member
Joined
Jan 25, 2018
Messages
10
Hi Guys, I'm new here and new to anything but the basics of excel. Trying to make a cell for fuel tank capacity based on the height (dip) of the fuel. Tank is uneven. The individual formulas work in a sheet where you have to put the figure in the corresponding cell, e.g between 43 to 63, however I can't make all of it work as a one cell calculation. The first and last do work, the others return FALSE. Your help would be appreciated, I've tried adding AND, also "" and writing it different ways from what I've seen on the forum without success.

=IF(IF(F13>127,F13*110+4020,
(IF(F13>110<=127,F13*128+1830,
(IF(F13>62<=110,F13*131+1500,
(IF(F13>42<=62,F13*127+1710,
(IF(F13>30<=42,F13*123+1855,
(IF(F13>15<=30,F13*120+1935,
(IF(F13<=15,F13*117+1980))))))))))))))
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
5,146
Hi,

Your formula modified:

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>C</th><th>F</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style="text-align: right;;">3150</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">13</td><td style="text-align: right;;"></td><td style="text-align: right;;">10</td></tr></tbody></table><p style="width:4.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet8</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">C1</th><td style="text-align:left">=IF(<font color="Blue">F13<=15,F13*117+1980,IF(<font color="Red">F13<=30,F13*120+1935,IF(<font color="Green">F13<=42,F13*123+1855,IF(<font color="Purple">F13<=62,F13*127+1710,IF(<font color="Teal">F13<=110,F13*131+1500,IF(<font color="#FF00FF">F13<=127,F13*128+1830,F13*110+4020</font>)</font>)</font>)</font>)</font>)</font>)</td></tr></tbody></table></td></tr></table><br />
 

Spoontang

New Member
Joined
Jan 25, 2018
Messages
10
Thank you jtakw, I see I had a few errors in how I did this. Your time and knowledge in replying to this is much appreciated. I got to the very frustrated stage....
I can now leave this and go enjoy the rest of Australia day with a cold beer or two.
Cheers,
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
5,146
You're welcome, welcome to the forum.

Cheers, Happy Australia Day.
 

Forum statistics

Threads
1,077,686
Messages
5,335,656
Members
399,032
Latest member
thefinu

Some videos you may like

This Week's Hot Topics

Top