Trying to create a mini rating system

LtCmdrData

Board Regular
Joined
Jan 24, 2018
Messages
58
Office Version
  1. 365
Platform
  1. Windows
Hi,

I hope someone can help or at least point me in the right direction. I am trying to create a what I'll call a mini rater. I want it to work like this: The user is prompted to enter a state from a drop down list. Next the user enters a weight that they want calculated. I have two columns of data behind the scenes. I need to find the row where the users weight falls between the values in the two columns. Next it looks to the right and finds the rate associated with the two columns or bracket. Finally it multiplies the weight entered by the user times the rate and returns a value. Below is an example of the data. Should I even be trying this in Excel? Or is this better suited for Access?

Del StAct LbsRatedelstateminWmaxWrate
AL240047665AL099945.82
AL1000199933.00
AL2000299919.86
AL3000399916.09
AL4000499910.68
AR099943.48
AZ2000299928.99
CA0999104.17
CA1000199962.98
CO099992.67
CT6000699913.80
CT9000999912.78
CT100001099912.44
FL099987.07
FL1000199929.75
FL2000299928.77
GA099931.32
GA2000299922.35


<colgroup><col width="64" style="width: 48pt;" span="8">
<tbody>






























































































































































































</tbody>
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Confirm with ctrl+shift+enter:
Code:
=INDEX(Table1[rate],MIN(IF(Table1[delstate]=A2,IF(Table1[maxW]>=B2,ROW(Table1[delstate])-1))))
 
Upvote 0
Give this formula a try

=SUMPRODUCT((A2=E2:E19)*($B$2>=F2:F19)*($B$2<=G2:G19)*(H2:H19))*$B$2

A2 is user state input cell
B2 is user weight input cell
 
Upvote 0
Thank you Neil. That accomplished what I was trying to do. If you don't mind could you explain in plain English how the formula works? I'm still new to these nested formulas and such.
 
Upvote 0
Thank you Neil. That accomplished what I was trying to do. If you don't mind could you explain in plain English how the formula works? I'm still new to these nested formulas and such.

The MIN function looks at all rows where [delstate] is equal to A2 and [maxW] is greater than or equal to B2. It then takes the row number (minus 1 to allow for the headers in row 1) and uses this in the INDEX formula to return the correct record from the [rate] field.

Hope that helps!
 
Upvote 0

Forum statistics

Threads
1,216,503
Messages
6,131,020
Members
449,615
Latest member
Nic0la

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