Band / Category assigning

tropiqz

New Member
Joined
Aug 28, 2018
Messages
10
Hi there,

I am wondering what the easiest way I can band values which are the closest to the actual values. Take the below example:

Here are my bands:
[TABLE="width: 258"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Chargeband[/TD]
[TD]Exc VAT (pence per min)[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4.5[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]4.5[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]4.5[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]13.5[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]13.5[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]13.5[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]13.5[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]36[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="align: right"]36[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]36[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]36[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD="align: right"]67.5[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD="align: right"]67.5[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]90
[/TD]
[/TR]
</tbody>[/TABLE]

And here are some of the values I want to produce a chargeband for:
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]0.7439[/TD]
[/TR]
[TR]
[TD="align: right"]0.264[/TD]
[/TR]
[TR]
[TD="align: right"]0.264[/TD]
[/TR]
[TR]
[TD="align: right"]0.1501[/TD]
[/TR]
[TR]
[TD="align: right"]0.7439[/TD]
[/TR]
[TR]
[TD="align: right"]0.3344[/TD]
[/TR]
[TR]
[TD="align: right"]0.8876[/TD]
[/TR]
[TR]
[TD="align: right"]0.3344[/TD]
[/TR]
[TR]
[TD="align: right"]0.2137[/TD]
[/TR]
[TR]
[TD="align: right"]0.411



[/TD]
[/TR]
</tbody>[/TABLE]
e.g. value 0.7439 would fall into band 14.

I assume the best way would be through a VLOOKUP which will use < & > to make them fall into the appropriate band, is this the best way of doing it? Could anyone help with the best method?

Thanks in advance :)
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
You ought to explain this a bit better as it is a little confusing. How would you ever hit most of these bands the way you describe it? How would the formula ever produce band 2, 3, 5, 6 ,7 for example?
 
Upvote 0
Sorry, it is confusing. Essentially I need to band them to the nearest one, disregarding the fact some of the bands have the same Exc VAT. I should have excluded the duplicated.
 
Upvote 0
Ok lets try this and see if it produces what you want:

=MATCH(TRUE,INDEX($B$1:$B$14>D1*100,0),0)
 
Upvote 0
Maybe safer to use the index too:

=INDEX($A$1:$A$14,MATCH(TRUE,INDEX($B$1:$B$14>D1*100,0),0))
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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