Ask Your Question
0

calc - find value in subtable

asked 2016-11-09 18:00:37 +0200

DiesNuts gravatar image

Let's say I have a sheet and somewhere on it a table like

 AAAA      8      16     32     48     64
 50   x08050  x16050 x32050 x48050 x64050
150   x08150  x16150 x32150 x48150 x64150
250   x08250  x16250 x32250 x48250 x64250
350   x08350  x16350 x32350 x48350 x64350
450   x08450  x16450 x32450 x48450 x64450
550   x08550  x16550 x32550 x48550 x64550
650   x08650  x16650 x32650 x48650 x64650

where xYYZZZ represents the value in the column for YY and the row for ZZZ

How do I perform a lookup the kind of "Find me AAAA(YY,ZZ)"?

E.g. let's assume AAAA is at I32

then x64650 would be at N38.

and say I want to lookup x48550

I'm looking for a way to say

find me the value in J32:N38 where the value on the same row in column I is 550 and the value on the same column in row 32 is 48.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-11-09 20:07:38 +0200

mark_t gravatar image

Use VLOOKUP where MATCH is used to find the column.

=VLOOKUP(E29,$I$33:$N$39,MATCH(F29,$J$32:$N$32,0)+1)

Where E29 is 550 and F29 is 48.

edit flag offensive delete link more

Comments

Works as expected. Would have been nicer to explain what you're doing, though.

DiesNuts gravatar imageDiesNuts ( 2016-11-09 21:53:41 +0200 )edit
1

@DiesNuts, sorry but I thought it would be easily understood when you saw the formula. Match will search the column headers and return the position of the match to F29, this gets the correct column from the table after we add 1. Then Vlookup searches the table to find the row where the first column matches E29 and returns the value found in the column specified by the match function.

mark_t gravatar imagemark_t ( 2016-11-09 22:45:15 +0200 )edit
1

If the first column of the table is not sorted, you might want to add a fourth argument of 0. =VLOOKUP(E29,$I$33:$N$39,MATCH(F29,$J$32:$N$32,0)+1,0)

mark_t gravatar imagemark_t ( 2016-11-09 22:47:08 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-11-09 18:00:37 +0200

Seen: 57 times

Last updated: Nov 09 '16