# Match value in row and the find specific value in that table

##### New Member
https://screenshot.net/r4rlxf1

Hi,

this should be easy but I can't seem to find the solution.

See attached picture on top of the page (couldnn't add it as a picture in the post?). First I need to find the ID in column B base on values in N5-N7. The I want it to return the lastest salary possible. The problem here as you can see is that the amount of rows is not the same in each table but there are always an empty row after the last row in each table.

So the resault I want is in O5-O7. I alreday have the ID, so for ID 790101 I want the salary 22 850 to be in O5 which can be found in cell E29? How can I do that? Also the will be a lot of rows (probably 50.000-100.000).

/Per

### Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

##### New Member
I can ofcause use index match but the I'll only get to the row of the ID. How do I calculate number of rows bellow (in this case) the ID until next empty cell so I get the last row in that specific table?

/Per

Last edited:

Solved