Clustering values

cogumelo

Board Regular
Joined
Mar 23, 2006
Messages
181
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a list of values where i want to use a formula to fill the last column (Q) with the corresponding value q1, q2, q3 or q4 that is defined in the second table.

Can anyone help out with the correct formula to do this?

thx in advance

list
namevalueQ
text199q1
text2101q2
text3200...
text4500...
text51...

<tbody>
</tbody>



q1>0<100
q2>101<200
q3>201<300
q4>301

<tbody>
</tbody>
 
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
If your second table doesn't change you can use
=LOOKUP(B2,{0,101,201,301},{"q1","q2","q3","q4"})
 
Upvote 0
If your second table doesn't change you can use
=LOOKUP(B2,{0,101,201,301},{"q1","q2","q3","q4"})

Hi Fluff,

Thanks. It works perfectly but they do change every now and then. Can you show me how you would do it in that case?

thx in advance
 
Upvote 0
How about


Excel 2013 32 bit
ABC
1namevalue
2text199q1
3text2101q2
4text3301q4
5text4500q4
6text51q1
7
8
9
10
11q10
12q2101
13q3201
14q4301
Summary 1
Cell Formulas
RangeFormula
C2=INDEX(A$11:B$14,MATCH(B2,B$11:B$14,1),1)



Where the green cells represent the lookup table
 
Last edited:
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,956
Members
449,096
Latest member
Anshu121

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