Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Pulling multiple values from a list based on a wildcard search value?

I need some help w/ some excel coding. After reading the article "How
to look up a value in a list and return multiple corresponding values"
by Ashish Mathur
(http://office.microsoft.com/en-gb/as...260381033.aspx) I
would like to use this code but modify it so my "search" value can
include wildcards...

So in reference to the example at the Microsoft website (above),
instead of searching for "Ashish", I would like to be able to search
for "????sh" and return the multiple values for both "Ashish" and
"Rajesh"

Unfortunately I can't get this working and was wondering if anyone
could lend a hand.

Thanks in advance!
-bdh

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Pulling multiple values from a list based on a wildcard search value?

Try...

D1, copied down:

=IF(ROWS(D$1:D1)<=COUNTIF(A$1:A$7,"*sh"),INDEX(B$1 :B$7,SMALL(IF(RIGHT(A$1
:A$7,2)="sh",ROW(B$1:B$7)-ROW(B$1)+1),ROWS(D$1:D1))),"")

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article . com,
wrote:

I need some help w/ some excel coding. After reading the article "How
to look up a value in a list and return multiple corresponding values"
by Ashish Mathur
(
http://office.microsoft.com/en-gb/as...260381033.aspx) I
would like to use this code but modify it so my "search" value can
include wildcards...

So in reference to the example at the Microsoft website (above),
instead of searching for "Ashish", I would like to be able to search
for "????sh" and return the multiple values for both "Ashish" and
"Rajesh"

Unfortunately I can't get this working and was wondering if anyone
could lend a hand.

Thanks in advance!
-bdh

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Pulling multiple values from a list based on a wildcard search value?

I guess I was hoping for the search value to be more flexible, in that
it may be referenced from its own cell instead of within the actual
formula. That way if I were to search for other
options/characters/etc., I would not have to change the formula code
and would only have to change the single cell.

Thoughts?
-bdh


Domenic wrote:
Try...

D1, copied down:

=IF(ROWS(D$1:D1)<=COUNTIF(A$1:A$7,"*sh"),INDEX(B$1 :B$7,SMALL(IF(RIGHT(A$1
:A$7,2)="sh",ROW(B$1:B$7)-ROW(B$1)+1),ROWS(D$1:D1))),"")

...confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article . com,
wrote:

I need some help w/ some excel coding. After reading the article "How
to look up a value in a list and return multiple corresponding values"
by Ashish Mathur
(
http://office.microsoft.com/en-gb/as...260381033.aspx) I
would like to use this code but modify it so my "search" value can
include wildcards...

So in reference to the example at the Microsoft website (above),
instead of searching for "Ashish", I would like to be able to search
for "????sh" and return the multiple values for both "Ashish" and
"Rajesh"

Unfortunately I can't get this working and was wondering if anyone
could lend a hand.

Thanks in advance!
-bdh


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Pulling multiple values from a list based on a wildcard search value?

Assuming that C1 contains the search value of interest, such as 'sh',
try the following formula instead...

=IF(ROWS(D$1:D1)<=COUNTIF(A$1:A$7,"*"&$C$1),INDEX( B$1:B$7,SMALL(IF(RIGHT(
A$1:A$7,LEN($C$1))=$C$1,ROW(B$1:B$7)-ROW(B$1)+1),ROWS(D$1:D1))),"")

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article . com,
"bdh_google" wrote:

I guess I was hoping for the search value to be more flexible, in that
it may be referenced from its own cell instead of within the actual
formula. That way if I were to search for other
options/characters/etc., I would not have to change the formula code
and would only have to change the single cell.

Thoughts?
-bdh

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Pulling multiple values from a list based on a wildcard search value?

To add even more flexibilty and be able to find the criteria *anywhere
within* the string:

=IF(ROWS(D$1:D1)<=COUNTIF(A$1:A$7,"*"&$C$1&"*"),IN DEX(B$1:B$7,SMALL(IF(ISNUMBER(SEARCH($C$1,A$1:A$7) ),ROW(B$1:B$7)-ROW(B$1)+1),ROWS(D$1:D1))),"")

C1 = sh

This would match strings like:

Fish
Sheep
Trisha

Biff

"Domenic" wrote in message
...
Assuming that C1 contains the search value of interest, such as 'sh',
try the following formula instead...

=IF(ROWS(D$1:D1)<=COUNTIF(A$1:A$7,"*"&$C$1),INDEX( B$1:B$7,SMALL(IF(RIGHT(
A$1:A$7,LEN($C$1))=$C$1,ROW(B$1:B$7)-ROW(B$1)+1),ROWS(D$1:D1))),"")

...confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article . com,
"bdh_google" wrote:

I guess I was hoping for the search value to be more flexible, in that
it may be referenced from its own cell instead of within the actual
formula. That way if I were to search for other
options/characters/etc., I would not have to change the formula code
and would only have to change the single cell.

Thoughts?
-bdh





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to search for given term, and if not found in column to add it to list financier Excel Worksheet Functions 3 July 12th 06 03:12 PM
How to Change List Based on Value Chosen in Another List Edwin Kelly Excel Worksheet Functions 4 March 2nd 06 07:31 PM
Need No Blanks List based on two conditions Chaturanga Excel Worksheet Functions 9 October 30th 05 03:12 AM
multiple select from the drop down list in excel. list in one sheet and drop down in sriramus Excel Discussion (Misc queries) 5 October 27th 05 06:55 PM
Count unique values and create list based on these values vipa2000 Excel Worksheet Functions 7 August 5th 05 01:17 AM


All times are GMT +1. The time now is 11:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"