philmophlegm: (Traveller Book)
philmophlegm ([personal profile] philmophlegm) wrote2012-02-06 09:05 pm
Entry tags:

Excel AKICOLJ

How do I do this in Excel?

I want to enter a value in the range 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F (or similar) in one cell, and then in another cell show the entry from a table that corresponds to this value.

For example, I want to enter the value 'B' in the 'Atmosphere' column and then have my spreadsheet show in the next cell that Atmosphere B is 'Corrosive'. If I had put in '5', it would show 'Thin'.
andrewducker: (Default)

[personal profile] andrewducker 2012-02-06 09:35 pm (UTC)(link)
Yeah, a VLookup. If you have your values from A1->A10 and the things you want to lookup in B1->B10 and the location of the value to lookup is in D1 then you want:
=VLOOKUP(D1,A1:B10,2,FALSE)

The "2" is the column of the answer, and the "FALSE" says "Don't look for an approximate match, give me an exact one".

[identity profile] king-pellinor.livejournal.com 2012-02-07 07:22 am (UTC)(link)
The 2 is inclusive counting, remember - you count the column you start with, so this value should always be at least 2.

You can also do an HLookup, with values in A1-M1 and targets in A2-M2, but these are less common. But handy if you have lots of tables, which I know you might... ;-)
ext_189645: (Default)

[identity profile] bunn.livejournal.com 2012-02-07 09:59 am (UTC)(link)
He has a lot of tables. I offered to show him how to do them in MySQL, but I was scorned. SCORNED!

[identity profile] king-pellinor.livejournal.com 2012-02-07 10:01 am (UTC)(link)
You sound furious :-)