# Help with if formula

#### barim

##### Board Regular
Hi,

I would like to calculate the following:

Cell B2 is where value is entered

Cell G2 where if formula needs to stay.

When value in B2 is less than 1600 than nothing, when value is greater than or equals to 1600 and less than or equals to 3201, then (B2 -1600) * .0275, if it is above 3201 then nothing.

So, here there is range from 1600 until reaches 3201 where calculation needs to be done, everything out of this range is zero.

I tried this but it doesn't work.
Code:
``=IF(AND(B2>=1600,B2<=3201),"",(B2-1600)*0.0275,0)``

Thanks.

### Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

#### timorrill

##### Well-known Member
Barim,

You have too many arguments in your IF function, and some of them are out of place. Try this:

=IF(AND(B2>=1600,B2<=3201),(B2-1600)*0.0275,"")

Hope this helps.

#### barim

##### Board Regular
I used that formula, but when I enter 14, 492 it shows 0, and it should calculate maximum amount between 1600 and 3201 which will be 1601 times .0275. I just don't know how to make it work.

#### Richard Schollar

##### MrExcel MVP
Hi Barim

...if it is above 3201 then nothing.

From this quote, it would appear that your formula is calculating as you required (14492 is over 3201).

I think it would help if you reviewed your criteria and make sure they are as you require.

Best regards

Richard

Replies
1
Views
234
Replies
3
Views
2K
Replies
8
Views
610
Replies
2
Views
95
Replies
24
Views
1K

1,141,163
Messages
5,704,667
Members
421,361
Latest member
AJPlant

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back