Lookup funtion: column index number (third parameter)
Here's what I do: I insert a row at the top of the table (assume table goes
from column A to column Z) and enter 1 in A1. Then =A1+1 in B1 and fill to
the right as far as the table goes.
Ergo, when I find the relevant column for the column lookup, all I have to
do is reference the number in the first row of the spreadsheet. Seems far
easier than relying on Microsoft to make it easier.
Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.
"KipB" wrote:
I was hoping Excel 2007 would have a simpler way of identifying the "column
index number", the third parameter in the VLOOKUP funtion. It is very
tedious to count columns (especially when they are listed alphabetically) -
and the task is even more difficult when dealing with large tables or
references that don't begin in column "A".
TIP for MSExcel 2007 - Ideally the named lookup table would recognize column
headings as the "column index number" and allow you to pick these from a list
once the table name is selected.
The way to work around this is to include a row of numbers above the lookup
table that counts the columns. This could be hard data or better yet the
formula: =column(X)-column($A)+1. Using the formula updates the column
number if the lookup table adds or deletes columns. In the lookup function
for "column index number" you can enter the cell reference for the desired
column by pointing, or better still give the reference a name ("Price") and
use the name as the reference. Now you have a meaningful lookup function
such as: =vlookup(A6,Data,Price,false).
|