Need Help on IF statements

J

JMyers

I am trying to create an xls template.

I have it where in like B27, the user enters a numeric varialble. onc
that variable is entered, in D27 it will evaluate the value in B27 an
print a set statement.

these variable in B27 are ranges.

like this

if the numeric value is below 6% then print "A" in D27

if the numeric value is between 6% and less than 7% then print "B" i
D27

if the numeric value is between 7% and less than 8% then print "C" i
D27

if the number value is 8% and greater, then print "D" in D27


I hope someone can help me with the syntax for the formula for this.
have more to do, but with this I can figure the rest out.

Thank you

Jef
 
F

Frank Kabel

Hi
try in D27
=IF(B27>=0.08,"D",IF(B27>=0.07,"C",IF(B27>=0.06,"B","A")))

or try
=CHAR(66+MAX(INT((B27-0,06)*100),-1))
 
R

Ron Rosenfeld

I am trying to create an xls template.

I have it where in like B27, the user enters a numeric varialble. once
that variable is entered, in D27 it will evaluate the value in B27 and
print a set statement.

these variable in B27 are ranges.

like this

if the numeric value is below 6% then print "A" in D27

if the numeric value is between 6% and less than 7% then print "B" in
D27

if the numeric value is between 7% and less than 8% then print "C" in
D27

if the number value is 8% and greater, then print "D" in D27


I hope someone can help me with the syntax for the formula for this. I
have more to do, but with this I can figure the rest out.

Thank you

Jeff

In addition to Frank's answer, you could also use a LOOKUP function. This
might have some advantages if your template becomes more complex. As a
formula:

=VLOOKUP(A1,{0,"A";0.06,"B";0.07,"C";0.08,"D"},2)

but the array constant can also be set up as a table and referred to that way.
See HELP for VLOOKUP for examples.


--ron
 
Top