ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   if function (https://www.excelbanter.com/excel-discussion-misc-queries/447519-if-function.html)

Duncan Robert

if function
 
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

Don Guillett[_2_]

if function
 
On Tuesday, October 30, 2012 12:29:23 PM UTC-5, Duncan Robert wrote:
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









--

Duncan Robert


Have a look at the help index for CHOOSE

Claus Busch

if function
 
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
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

joeu2004[_2_]

if function
 
"Duncan Robert" wrote:
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.



All times are GMT +1. The time now is 05:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com