if function

D

Duncan Robert

I'm fairly new to excel. I have a problem with a formula that I nee
help on. Here is what I want to do.

If B2 is between 270 and 284 then return .013 in C2
If B2 is between 285 and 290 then return .135 in C2

I have more senereos for the same formula, but I'm sure you get th
idea.

Any help would be appreciated!

Duncan Rober
 
D

Don Guillett

I'm fairly new to excel. I have a problem with a formula that I need

help on. Here is what I want to do.



If B2 is between 270 and 284 then return .013 in C2

If B2 is between 285 and 290 then return .135 in C2



I have more senereos for the same formula, but I'm sure you get the

idea.



Any help would be appreciated!



Duncan Robert

Have a look at the help index for CHOOSE
 
C

Claus Busch

Hi Robert,

Am Tue, 30 Oct 2012 17:29:23 +0000 schrieb Duncan Robert:
If B2 is between 270 and 284 then return .013 in C2
If B2 is between 285 and 290 then return .135 in C2

try:
=IF(AND(B2>=270,B2<=284),0.013,IF(AND(B2>=285,B2<=290),0.135,""))
or
=(AND(B2>=270,B2<=284))*0.013+(AND(B2>=285,B2<=290))*0.135


Regards
Claus Busch
 
J

joeu2004

Duncan Robert said:
Here is what I want to do.
If B2 is between 270 and 284 then return .013 in C2
If B2 is between 285 and 290 then return .135 in C2

And what if B2 is less than 270 or more than 290?

Perhaps:

=IF(B2<270,0,IF(B2<285,0.013,IF(B2<=290,0.135,0))))

Alternatively:

=LOOKUP(ROUND(B2,0),{0,270,285,291},{0,0.013,0.135,0})

ROUND(B2,0) takes care of the case B2 itself is not an integer. But it
might be the result you are looking for in that case.
 

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