Complex lookup

tonkerthomas

Board Regular
Joined
Feb 12, 2014
Messages
56
Good morning everybody.

I have a spreadsheet which is made up of six identical, adjacent blocks of data, each of twenty columns or so. The structure of each block of data is identical. Within those six blocks of data, I need to be able to find a value (which can only appear once), and look up the value which is next to it. I feel sure this isn't that hard, but having not used Excel for a few years, and with a new version (Office 365) to work with, I'm struggling to do things which I might once have done without thinking. It's a terrible thing to get old. ;)

Can anybody help me, please?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
col D
row 7789212223313233
345242526419955
862272829666768
find the 99 hidden somewhere in the 3 tables above and return the number to the right of it
7#N/A
8128the 8 is the row number containing the 99and is in cell F20
9#N/A
55
obtained by
=OFFSET($A$1,$F$20-1,E20+2)
copyright
bob aged 73

<colgroup><col width="64" span="16" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
I am old and make typos

col D
row 7789212223313233
345242526419955
862272829666768
find the 99 hidden somewhere in the 3 tables above and return the number to the right of it
7#N/A
8128the 8 is the row number containing the 99 and is in cell F20
9#N/A
55
obtained by
=OFFSET($A$1,$F$20-1,E20+2)
copyright
bob aged 73

<colgroup><col width="64" span="17" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
I am old and make typos

col D
row 7789212223313233
345242526419955
862272829666768
find the 99 hidden somewhere in the 3 tables above and return the number to the right of it
7#N/A
8128the 8 is the row number containing the 99 and is in cell F20
9#N/A
55
obtained by
=OFFSET($A$1,$F$20-1,E20+2)
copyright
bob aged 73

<tbody>
</tbody>

Thank you, Bob, your time is very much appreciated. Unless I've misunderstood this, though, OFFSET only works if I already know where the value I'm looking for is - and I don't. The data is not static, it will change, and then I need to be able to not only look up the value to the right of my target, but to be able to find my target (in your example, the 99) in the first place. Does that make sense? Have I got the wrong end of the stick?

Jeff
 
Upvote 0
Jeff - my formula did not know where the 99 was - the 12 was found by =MATCH(99,C8:O8,0) - this was applied to every row, so returned 2 errors and the 12 meaning the 12th cell in C8 to O8
 
Upvote 0
How about


Excel 2013/2016
ABCDEF
1866348
21598410
3681653
4999910103
52107162
664410111
7558473
8
999
1010
Quote
Cell Formulas
RangeFormula
A10=SUMPRODUCT(--(A1:F7=A9),(B1:G7))
 
Upvote 0
It's effectively offsetting the range by 1 column, so that the returned value is 1 column to the right of the "found" value
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,428
Members
448,961
Latest member
nzskater

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