Excel partial match from unequal columns and assign value to new column.

xjabbott

New Member
Joined
Mar 15, 2019
Messages
2
I want to assign a category to a table so that I can eventually create a pivot table.
I need to do a partial match to get my category values.
"num" i want to match to "number 111" and "numeric 321" and then assign both of those as category1.
"form" i want to match to "Form 1" and "formula" as category2 and so on.


GroupAssigned catorgoriesMatching criteraCategories
Number 111
numcategory1
Numeric 321formcategory2
Form 1datacategory3
Uncategorizedmisccategory4
test data
prod data
formula

<tbody>
</tbody>
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Please try
B2
=LOOKUP(0,-SEARCH($D$2:$D$5,A2),$E$2:$E$5)
or
Uncategorized => category4
=IFERROR(LOOKUP(0,-SEARCH($D$2:$D$5,A2),$E$2:$E$5),$E$5)
 
Upvote 0
Thanks Bo_Ry... that worked... I was so sunk into vlookup or index and match that I didn't consider lookup.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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