Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to list names in column A associated to multiple matches in col B 1

Status
Not open for further replies.

TimBishop

MIS
Aug 13, 1999
2
US
I have an Excel 2000 spreadsheet where column a contains names of sites (unique), column b contains percentages of completion. I want to list in a single cell the names of the sites that match certain criteria. Example:<br>
a1-a5 contain Toledo, New York, Los Angeles, Atlanta, and Tulsa. b1-b5 contain .95, .78, .95, .54, .95. If I wanted to list in c1 all sites that = .95, which should be Toledo, Los Angeles, and Tulsa, how would I do it (site names separated by comma and a space)? I can get a single occurrence using OFFSET/MATCH, VLOOKUP, or the IF functions, but unsuccessful in getting it to list all matches in a single cell.
 
Here's something that will work (although maybe not the cleanest way):<br>
<br>
In some unused portion of your spreadsheet, let's say column AA:<br>
<br>
In AA1 enter the formula =If(B1=.95,&quot;, &quot;&A1,&quot;&quot;)<br>
This will return the city name prepended with a comma and a space if the .95 criteria is met. Otherwise it will return a null entry. Fill this formula down through AA5.<br>
<br>
In some cell, say AA7, enter =AA1&AA2&AA3&AA4&AA5<br>
This will create a concatenated string of the values in AA1 through AA5.<br>
<br>
Now back in cell C1, enter =Right(AA7,Len(AA7)-2)<br>
This will return the list of cities meeting the criteria with the leading comma and space stripped off. <p>Tom Thaden<br><a href=mailto:thadents@usano.ksc.nasa.gov>thadents@usano.ksc.nasa.gov</a><br><a href= > </a><br>
 
FYI, this is exactly the kind of work that databases were created to do easily. You can import your table into Access and easily write a query or report to do this tpe of thing.
 
Thanks Trunk, your suggestion worked fine. Elizabeth, I am aware that databases do this however they do not give the visability that spreadsheets provide, I am a db programmer and would normally use Access, thanks for your input as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top