ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find All Instances of a Value (https://www.excelbanter.com/excel-programming/395101-find-all-instances-value.html)

[email protected]

Find All Instances of a Value
 
Hello,

I have a weird problem that I think can be best described with an
example. I have a "lookup table" immediately below, and a list of
"Values to look up" and expected results for when I look up those
values below that. Please look at the example and see if you can
answer the question below.

List of Words Table Values
aaa 1,2,3,4,5
bbb 1,3,5
ccc 3,4,5

Values to Look Up Expected Results
1 aaa,bbb
2 aaa
3 aaa,bbb,ccc
4 aaa,ccc
5 aaa,bbb,ccc

So, what I'm asking is... if I have a lookup table like the one above,
and a list of values, can I iterate through every value in my list,
and end up with every word that corresponds to that value in the
lookup table (as shown in the 'Expected Results' above)?

Thanks!

-Ben


joel

Find All Instances of a Value
 
I table values are less than 9 you won't have a problem. If above 9, you
will have to extract the numbers in the commar delimited string. Otherwise
you if you search for a 1 and you have the numbers 1 & 10 you'll have a
problem.

" wrote:

Hello,

I have a weird problem that I think can be best described with an
example. I have a "lookup table" immediately below, and a list of
"Values to look up" and expected results for when I look up those
values below that. Please look at the example and see if you can
answer the question below.

List of Words Table Values
aaa 1,2,3,4,5
bbb 1,3,5
ccc 3,4,5

Values to Look Up Expected Results
1 aaa,bbb
2 aaa
3 aaa,bbb,ccc
4 aaa,ccc
5 aaa,bbb,ccc

So, what I'm asking is... if I have a lookup table like the one above,
and a list of values, can I iterate through every value in my list,
and end up with every word that corresponds to that value in the
lookup table (as shown in the 'Expected Results' above)?

Thanks!

-Ben




All times are GMT +1. The time now is 06:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com