# 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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### 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
3
Views
172
Replies
6
Views
62
Replies
2
Views
58
Replies
0
Views
121
Replies
5
Views
61