Calculator formula using If/Then without a macro?

paquirl

Board Regular
Joined
Oct 12, 2010
Messages
226
Office Version
  1. 2016
Platform
  1. Windows
Does anyone know how to do this?

Wanting to make a calculator where we input a number into a cell, say D1.
IF the number falls within a particular range it gets multiplied by a particular number and the answer is displayed somewhere, say G1.

If the number falls within range 6225-6725, then it is multiplied by 10 and the answer displayed in G1 as a dollar amount.
If the number falls within range 6726-7225, then it is multiplied by 15 and the answer displayed in G1 as a dollar amount.
If the number falls within range 7226-7500, then it is multiplied by 20 and the answer displayed in G1 as a dollar amount.

Help?!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
What happens if the number is outside those ranges?
 
Upvote 0
Ok, how about
=IF(OR(D1<6225,D1>7500),"No deal",D1*IF(D1<6726,10,IF(D1<7226,15,20)))
 
Upvote 0
Ok, how about
=IF(OR(D1<6225,D1>7500),"No deal",D1*IF(D1<6726,10,IF(D1<7226,15,20)))

I put this formula into G1 where the result is displayed. It immediately says no deal.
No matter what I put into D1 nothing changes in G1. So I guess this does not work.

[TABLE="width: 576"]
<colgroup><col width="64" span="9" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl67, width: 192, colspan: 3"]Wheels Purchased in 2020:[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"]No deal[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[/TR]
[TR]
[TD="class: xl65, colspan: 3"]Range from:[/TD]
[TD]Range to:[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64, colspan: 3"]$ rebate earned per wheel[/TD]
[/TR]
[TR]
[TD="class: xl66, colspan: 3"]6225[/TD]
[TD="align: right"]6725[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl63, align: right"]$10 [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl66, colspan: 3"]6726[/TD]
[TD="align: right"]7225[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl63, align: right"]$15 [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl66, colspan: 3"]7226[/TD]
[TD="align: right"]7500[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl63, align: right"]$20 [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
So I guess this does not work.
Yes it does, what are you putting into D1?


Book1
DEFG
10No deal
2622562250
36726100890
47220108300
57228144560
67501No deal
Sheet3
Cell Formulas
RangeFormula
G1=IF(OR(D1<6225,D1>7500),"No deal",D1*IF(D1<6726,10,IF(D1<7226,15,20)))
 
Upvote 0
My bad .. I put it in the wrong cell. It works !!
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top