fletchw_111
New Member
- Joined
- Aug 18, 2015
- Messages
- 9
Hi - I've got a complicated problem I hope you can have fun with (VBA or formula solutions are welcome).
In a multi-worksheet workbook, I am trying to search a multi-column & row range in a different sheet for a cell that contains the same text as a pre-identified cell in the active sheet. If a match exists, I want to retrieve the contents from the cell to the right of the found cell.
A few wrinkles that would also help. Can the identity of the sheet to search in be variable based on the column header. Also, the search returns a match but the cell to the right is empty can the formula return a "?".
In the example below, the desired result is that ACTIVE SHEET C2 have a formula that searched the range B19:G21 of the sheet identified in C1 for the text identified in ACTIVE SHEET A2. The result would be that '1'!B19:G21 would be searched for "Jordan", which would be found in '1'!B19, so the content of '1'!C19, "x", would populate cell 'ACTIVE SHEET'!C2.
Thanks for any help (sorry this is so complicated, please write for clarification
<tbody>
[TD="class: xl71"]ACTIVE SHEET
[/TD]
[TD="class: xl71"][TABLE="width: 417"]
<tbody>[TR]
[TD="align: right"]C[/TD]
[TD="align: right"]D[/TD]
[TD="align: right"]E[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
</tbody>[/TD]
[/TR]
[TR]
[TD="class: xl71"]Searched Sheet Title: 1
[/TD]
[/TR]
[TR]
[TD="class: xl71"]
<tbody>
[TD="align: center"][/TD]
[TD="class: xl67, width: 101, align: center"]B[/TD]
[TD="width: 42, align: center"]C[/TD]
[TD="class: xl67, width: 101, align: center"]D[/TD]
[TD="width: 42, align: center"]E[/TD]
[TD="class: xl67, width: 101, align: center"]F[/TD]
[TD="width: 42, align: center"]G[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl66"]19[/TD]
[TD="class: xl66"]Jordan[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]Barkeley[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]Colbert[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]20[/TD]
[TD="class: xl66"]Smits[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]James[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]Soderbegh[/TD]
[TD="class: xl66"]?[/TD]
[TD="class: xl66"]21[/TD]
[TD="class: xl66"]Mullen[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"]Curry[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]Olajuwuan[/TD]
[TD="class: xl66"][/TD]
</tbody>[/TD]
[/TR]
[TR]
[TD="class: xl71"][/TD]
[/TR]
[TR]
[TD="class: xl71"]Searched Sheet Title: 2
<tbody>
[TD="align: center"][/TD]
[TD="class: xl67, width: 101, align: center"]B[/TD]
[TD="width: 42, align: center"]C[/TD]
[TD="class: xl67, width: 101, align: center"]D[/TD]
[TD="width: 42, align: center"]E[/TD]
[TD="class: xl67, width: 101, align: center"]F[/TD]
[TD="width: 42, align: center"]G[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl66"]19[/TD]
[TD="class: xl66"]Jones[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]Altuve[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]Jordan[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"]20[/TD]
[TD="class: xl66"]Payton[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]Olajuwuan[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]Strawberry[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]21[/TD]
[TD="class: xl66"]Fawkes[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"]Barkely[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]Nomo[/TD]
[TD="class: xl66"]o[/TD]
</tbody>[/TD]
[/TR]
</tbody>[/TABLE]
In a multi-worksheet workbook, I am trying to search a multi-column & row range in a different sheet for a cell that contains the same text as a pre-identified cell in the active sheet. If a match exists, I want to retrieve the contents from the cell to the right of the found cell.
A few wrinkles that would also help. Can the identity of the sheet to search in be variable based on the column header. Also, the search returns a match but the cell to the right is empty can the formula return a "?".
In the example below, the desired result is that ACTIVE SHEET C2 have a formula that searched the range B19:G21 of the sheet identified in C1 for the text identified in ACTIVE SHEET A2. The result would be that '1'!B19:G21 would be searched for "Jordan", which would be found in '1'!B19, so the content of '1'!C19, "x", would populate cell 'ACTIVE SHEET'!C2.
Thanks for any help (sorry this is so complicated, please write for clarification
A | B | |||
Last Name | First Name | |||
Jordan | Michael | |||
Olajuwuan | Hakeem | |||
Barkely | Charles |
<tbody>
[TD="class: xl71"]ACTIVE SHEET
[/TD]
[TD="class: xl71"][TABLE="width: 417"]
<tbody>[TR]
[TD="align: right"]C[/TD]
[TD="align: right"]D[/TD]
[TD="align: right"]E[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
</tbody>
[/TR]
[TR]
[TD="class: xl71"]Searched Sheet Title: 1
[/TD]
[/TR]
[TR]
[TD="class: xl71"]
18 |
<tbody>
[TD="align: center"][/TD]
[TD="class: xl67, width: 101, align: center"]B[/TD]
[TD="width: 42, align: center"]C[/TD]
[TD="class: xl67, width: 101, align: center"]D[/TD]
[TD="width: 42, align: center"]E[/TD]
[TD="class: xl67, width: 101, align: center"]F[/TD]
[TD="width: 42, align: center"]G[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl66"]19[/TD]
[TD="class: xl66"]Jordan[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]Barkeley[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]Colbert[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]20[/TD]
[TD="class: xl66"]Smits[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]James[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]Soderbegh[/TD]
[TD="class: xl66"]?[/TD]
[TD="class: xl66"]21[/TD]
[TD="class: xl66"]Mullen[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"]Curry[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]Olajuwuan[/TD]
[TD="class: xl66"][/TD]
</tbody>
[/TR]
[TR]
[TD="class: xl71"][/TD]
[/TR]
[TR]
[TD="class: xl71"]Searched Sheet Title: 2
18 |
<tbody>
[TD="align: center"][/TD]
[TD="class: xl67, width: 101, align: center"]B[/TD]
[TD="width: 42, align: center"]C[/TD]
[TD="class: xl67, width: 101, align: center"]D[/TD]
[TD="width: 42, align: center"]E[/TD]
[TD="class: xl67, width: 101, align: center"]F[/TD]
[TD="width: 42, align: center"]G[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl65, align: center"]Spares[/TD]
[TD="class: xl68, align: center"]Status[/TD]
[TD="class: xl66"]19[/TD]
[TD="class: xl66"]Jones[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]Altuve[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]Jordan[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"]20[/TD]
[TD="class: xl66"]Payton[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]Olajuwuan[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]Strawberry[/TD]
[TD="class: xl66"]x[/TD]
[TD="class: xl66"]21[/TD]
[TD="class: xl66"]Fawkes[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"]Barkely[/TD]
[TD="class: xl66"]o[/TD]
[TD="class: xl66"]Nomo[/TD]
[TD="class: xl66"]o[/TD]
</tbody>
[/TR]
</tbody>[/TABLE]