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
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,594
Office Version
  1. 2007
Platform
  1. Windows
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>
 

vipin30sep

New Member
Joined
Feb 14, 2019
Messages
20
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>
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,594
Office Version
  1. 2007
Platform
  1. Windows
I'm glad to help you. Thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,306
Messages
5,571,460
Members
412,394
Latest member
divster27
Top