=IF function

R

Raffi

I could really use some help with a function in Excel.

Example: A1 has the number 5. in cell A2 I want to use a
formula to calculate the following. If the Value in A1 is
between 0 and 3, then multiply that value by 2. If Value
in A1 is between 3 and 8, then multiply that value by 4.
If Value in A1 is greater than 8, then multiply that value
by 5.

If anyone could offer any suggestions on how to make this
formula work I would greatly appreciate it.
 
C

Chip Pearson

Raffi,

Try

=IF(AND(A1>=0,A1<=2),A1*2,IF(AND(A1>=3,A1<=8),A1*3,A1*5))
or
=A1*(IF(AND(A1>=0,A1<=2),2,IF(AND(A1>=3,A1<=8),3,5)))
 
J

J.E. McGimpsey

One way:

=A1* IF(A1>8, 5, IF(A1>3, 4, 2))

which assumes A1 is zero or positive. If A1 may be negative:

=A1 * IF(A1>8, 5, IF(A1>3, 4, IF(A1>0, 2, 0)))

Another way:

=A1 * (2 *( (A1>0)+(A1>3))+(A1>8))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top