formula help

  • Thread starter Thread starter Cindy Conover
  • Start date Start date
C

Cindy Conover

I have a spreadsheet that helps me with fuel tax reporting. I need to
"tweak" a formula to get the correct results.
=IF(C58=0,"0.000",C58/D58) is my the formula that some how I need to add
that if the resulting number is above 7, I need it to use 5.5 as the result.
I have other cells that will use the resulting number this cell calculates
to see how much fuel tax needs to be collected for each state.
Is this possible?
Please let me know if this is not clear.

TIA from a newbie,

Cindy
 
Firstly, you do know your formula =IF(C58=0,"0.000",C58/D58)
returns text not a number when C58 is 0. Why not
a) =IF(C58=0,0,C58/D58) and format the cell to display 3 decimals
OR
b) =IF(C58=0,"",C58/D58) to display nothing when C58 is zero

Now to answer question: if it is above 7 that gets converted to 5.5
=IF(C58=0,"0.000",IF(C58/D58>7, 5.5,C58/D58)
Did you mean if great or equal to 7
=IF(C58=0,"0.000",IF(C58/D58>=7, 5.5,C58/D58)
best wishes
 
First of all thank you very much.
I think the formula was originally set up with "0.000" so if there was an
error it would show, but if the cell is zero I get #DIV/0!.
The formula A you gave me works great but I forgot if the result is Zero or
greater than 7 I would like it to use 5.5

Cindy
 
Jim & Bernard,

Thank you so much for you help. I think I have everything right. I will be
able to retest the formulas better at the end of this week when I get new
reports from my company.
Keep up the good work, I would be lost without you.

Cindy
 
Back
Top