Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Ivan Drago
Jan 17, 2003

Very simple question (I think):

What I want to do is find a value in an array and return a different value a certain number of columns over AND a certain number of rows down at the same time, like a combination of VLOOKUP and HLOOKUP. Is this possible?

As a quick means of reference, here's a simple table. How can I write a formula that finds "Jim" and returns his salary from this set of data? If there some sort of nested lookup function that would make this possible?
code:
     A       B       C
1    Jim     
2            Age     27
3            ID      2
4            Salary  $38,000
5    
6    Tom
7            Age     32
8            ID      8
9            Salary  $37,500
E: If I were to use =OFFSET(A1,3,2,1,1) this would work, but for the purposes of this file it would be easier if I could reference the lookup value by the text that inside ("Jim") rather than the cell itself (A1). I'm sure there's a way to nest an offset inside a lookup or a match or something along those lines but my brain isn't working today.

Ivan Drago fucked around with this message at 00:05 on Feb 2, 2011

Adbot
ADBOT LOVES YOU

Ivan Drago
Jan 17, 2003

esquilax posted:

Try something like "=index(C:C, match("Jim", A:A, 0)+3)"

Index() can also change columns if you need it.
Brilliant, works perfect for what I need. Thank you for that.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply