Lookup between a group of text values and assigning numbers to it

vipin30sep

New Member
Joined
Feb 14, 2019
Messages
20
Hello,

So I have a group of text values for Sizes like twins, Small, Medium, Large etc. in a sheet and I'm assigning values to those sizes. I'm using the formula as below and it always gives me error. Please help. Here is the formula I'm trying to use,
Code:
=LOOKUP('Prepaid Customer'!Y2,{"Twins", Small,Medium,Large,X-Large,2XL,3XL,Singleton},{8,7,6,5,4,3,2,1})

Here, 'Prepaid Customer'!Y2' cell contains formula to calculate Sizes
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Data must be alphabetically ordered from A-Z

Try this:


=LOOKUP('Prepaid Customer'!Y2,{"2XL","3XL","Large","Medium","Singleton","Small","Twins","X-Large"},{3,2,5,6,1,7,8,4})

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Thanks for your help. It doesn't seem to work. So these are the values that I need to assign,

Twins - 1
Small - 2
Medium - 3
Large - 4
X-Large - 5
2XL - 6
3XL - 7
Singleton - 8

Data must be alphabetically ordered from A-Z

Try this:


=LOOKUP('Prepaid Customer'!Y2,{"2XL","3XL","Large","Medium","Singleton","Small","Twins","X-Large"},{3,2,5,6,1,7,8,4})

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,535
Messages
6,120,090
Members
448,944
Latest member
sharmarick

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