A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Search for text in multiple columns



 
 
Thread Tools Display Modes
  #1  
Old November 11th, 2009, 09:47 PM posted to microsoft.public.excel.misc
tommcbrny
external usenet poster
 
Posts: 68
Default Search for text in multiple columns

Hello,

I use the following to search a column for names in a list (Sponsors) and
then print the name to the cell if found, otherwise print "False".

=IF(SUM(-ISNUMBER(SEARCH(Sponsors,A2)))=0,"False",INDEX(Spo nsors,MATCH(TRUE,ISNUMBER(SEARCH(Sponsors,A2)),0)) )

This works great, but I need to expand the search to cover multiple columns.
The columns are not contiguous. I need to search columns A, D, H, L, and P,
for names in the list, for instance, and print the name to the cell if the
name appears in any of these columns.

Is this possible?

Thank you,
Tom
  #2  
Old November 11th, 2009, 10:06 PM posted to microsoft.public.excel.misc
tommcbrny
external usenet poster
 
Posts: 68
Default Search for text in multiple columns


Slight correction, it searches a cell for a matching value in the list and
prints that matching value if found. I would like to search multiple cells,
so check A2, D2, and so on for a match.

"tommcbrny" wrote:

Hello,

I use the following to search a column for names in a list (Sponsors) and
then print the name to the cell if found, otherwise print "False".

=IF(SUM(-ISNUMBER(SEARCH(Sponsors,A2)))=0,"False",INDEX(Spo nsors,MATCH(TRUE,ISNUMBER(SEARCH(Sponsors,A2)),0)) )

This works great, but I need to expand the search to cover multiple columns.
The columns are not contiguous. I need to search columns A, D, H, L, and P,
for names in the list, for instance, and print the name to the cell if the
name appears in any of these columns.

Is this possible?

Thank you,
Tom

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.