Search that returns Range

Frank Horatio

New Member
Joined
Nov 23, 2010
Messages
14
Using Excel for Mac 2011...
<style> <!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @page {margin:1.0in .75in 1.0in .75in; mso-header-margin:.5in; mso-footer-margin:.5in;} td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:11.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} .xl65 {border:.5pt solid windowtext;} --> </style> <table style="border-collapse: collapse;width:225pt" border="0" cellpadding="0" cellspacing="0" width="225"> <colgroup><col style="width:65pt" span="2" width="65"> <col style="mso-width-source:userset;mso-width-alt:4053;width:95pt" width="95"> </colgroup><tbody><tr style="height:14.0pt" height="14"> <td class="xl65" style="height:14.0pt;width:65pt" height="14" width="65">Col A</td> <td class="xl65" style="border-left:none;width:65pt" width="65">Col B</td> <td class="xl65" style="border-left:none;width:95pt" width="95">Col C
</td> </tr> <tr style="height:14.0pt" height="14"> <td class="xl65" style="height:14.0pt;border-top:none" height="14">val 1</td> <td class="xl65" style="border-top:none;border-left:none">val 9</td> <td class="xl65" style="border-top:none;border-left:none">
</td> </tr> <tr style="height:14.0pt" height="14"> <td class="xl65" style="height:14.0pt;border-top:none" height="14">val 1</td> <td class="xl65" style="border-top:none;border-left:none">val 10</td> <td class="xl65" style="border-top:none;border-left:none">
</td> </tr> <tr style="height:14.0pt" height="14"> <td class="xl65" style="height:14.0pt;border-top:none" height="14">val 1</td> <td class="xl65" style="border-top:none;border-left:none">val 4</td> <td class="xl65" style="border-top:none;border-left:none">
</td> </tr> <tr style="height:14.0pt" height="14"> <td class="xl65" style="height:14.0pt;border-top:none" height="14">val 2</td> <td class="xl65" style="border-top:none;border-left:none">val 4</td> <td class="xl65" style="border-top:none;border-left:none">
</td> </tr> <tr style="height:14.0pt" height="14"> <td class="xl65" style="height:14.0pt;border-top:none" height="14">val 2</td> <td class="xl65" style="border-top:none;border-left:none">val 5</td> <td class="xl65" style="border-top:none;border-left:none">
</td> </tr> <tr style="height:14.0pt" height="14"> <td class="xl65" style="height:14.0pt;border-top:none" height="14">val 3</td> <td class="xl65" style="border-top:none;border-left:none">val 6</td> <td class="xl65" style="border-top:none;border-left:none">
</td> </tr> <tr style="height:14.0pt" height="14"> <td class="xl65" style="height:14.0pt;border-top:none" height="14">val 3</td> <td class="xl65" style="border-top:none;border-left:none">val 4</td> <td class="xl65" style="border-top:none;border-left:none">desired look-up cell</td> </tr> <tr style="height:14.0pt" height="14"> <td class="xl65" style="height:14.0pt;border-top:none" height="14">val 3</td> <td class="xl65" style="border-top:none;border-left:none">val 8</td> <td class="xl65" style="border-top:none;border-left:none">
</td> </tr> </tbody></table>
trying to look up the value as indicated in Column C from a different worksheet tab, knowing only the values in Col A and Col B. Not sure how to do this as the Vlookup only gives the the row with "val 3" - "val 6".

Alternatively, if there was a search that returned the row range for "val 3", I think I'd be able to search in that range for "val 4" and find the row I need for Col C.

Thanks!!!!
 
Last edited:

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
A number of alternative methods, in the below I have simplified the example with a single sheet.

Excel Workbook
ABCDEFGH
1Col ACol BCol CCol ACol BCol C
2val 1val 9bval 1val 10a
3val 1val 10aval 1val 9b
4val 1val 4missingval 2val 51
5val 2val 42val 2val 42
6val 2val 51val 3val 13
7val 3val 6yval 3val 8x
8val 3val 4missingval 3val 6y
9val 3val 8xval 3val 127
Sheet1


Generally speaking it's often best to create unique keys (concatenating values of interest) such that your search operates on a single column.

The embedded use of INDEX is merely to avoid Array entry requirement - a number here would advise against it.

If you are retrieving values, they were numeric type and unique match then you could use SUMIFS (given use of XL2011)
 
Upvote 0
Thanks!

Unfortunately, I could not control the reference worksheet tab in this instance. The formula works great though...
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,170
Members
448,870
Latest member
max_pedreira

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top