Index match Search

dwddavid

New Member
Joined
Mar 4, 2011
Messages
24
In Column G, I have got sentences for example
G1 I like Bananas
G2 I like Apples
G3 I like Grapes

In Column M, I have got the following formula
=INDEX($T$1:$T$300,MATCH("*"&LOOKUP(9.99999999999999E+307,SEARCH(List,G1),List)&"*",$S$1:$S$300,0))
This formula is filled down to last row of data of Column G. The 300 number represents the number of rows in S.

In Column S, I have types of fruits for example
S1 Apples,grapefruit
S2 Grapes,tomatos
S3 Bananana

In Column T, I have values for example
T1 1
T2 2
T3 3

In a separate sheet (same workbook), I have all possible fruits in Column E. I have defined the list name as list.

For the formula in Column M to work correctly, I would like to search column G for a fruit, Lookup that fruit in Column S and than return whatever value is in the same row for Column T.

The return for M1 should be 3
The return for M2 should be 1
The return for M3 should be 2

For some reason either a 1 or #N/A shows up in the M Column. Does this make sense?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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