Using Search and Vlookup or Index to tag rows using mapping tables

djstefko

New Member
Joined
Jan 19, 2016
Messages
2
I have a large data set with a 'description' column that is not always uniform, for example it could read "bla bla bla depreciation" or "depreciation bla bla bla" and both should be tagged as 'Depreciation' in a separate tagging column.

Is there a way/formula which I could create a mapping table with Column A being *depr* and Column B being "Depreciation" that would tag both above examples as 'Depreciation'??
Similar to a vlookup, but the lookup_value wouldn’t be define, instead would be all the possibilities in the mapping table's column A and if found in description would return column b value.

Appreciate any thoughts
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
If in column A, you type in what you're looking for:
Depr
Deprec
Depreciation

And assume your descriptions are in column E
bla bla Depr bla bla

You can try this formula
=IF(SUMPRODUCT(--ISNUMBER(SEARCH($A$2:$A$4,E2)))>0,"Depreciation","")

you can remove the IF aspects if you just want the formula to return TRUE or FALSE
=SUMPRODUCT(--ISNUMBER(SEARCH($A$2:$A$4,E2)))>0
 
Upvote 0
Thanks for the response, but I don't think this will solve for what I am trying to do.

I have a description column on one tab and would like to put a tag in the column next to it that is driven by a mapping table on another tab.

My issue is the lookup value from the description column would need search the description for the lookup values in the mapping table and if positive return the second column ('tag') from the mapping table.
 
Upvote 0
apologies if the formatting doesn't work... i'm not very good at this.
you have your mapping table on one tab:
[et]
Mapping Table
Lookup ValueTag
DeprDepreciation
DeprecDepreciation
DepreciationDepreciation
IncomeRevenue
IncRevenue
RevRevenue
RevenueRevenue

<tbody>
</tbody>
[et/]

on your data tab, you have your description column and you want your tag from the table above to show up under the formula column
[et]
Description Sheet
DescriptionFormula
Depreciation is based on straight lineDepreciation
This house has depr 20%Depreciation
Revenues are up 14%Depreciation
Inc for the year is $$$$$Revenue
Annual Income is upRevenue

<tbody>
</tbody>
[et/]

I did this with this formula:
=IF(SUMPRODUCT(--ISNUMBER(SEARCH('Mapping Table'!A3:A9,A3)))>0,OFFSET('Mapping Table'!$A$3:$A$9,0,1),"")
 
Upvote 0
Oh wait.. ignore this.. Just tested it again and it doesn't work after all. The example i used was just a coincidence.
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,349
Members
449,155
Latest member
ravioli44

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