H
Harlan
I've gotten pretty good at VLOOKUP functions, figuring out how to lookup a
value in a different worksheet based on two values in the first worksheet.
Now I need to figure out how to look up a value in a different worksheet
based on three values in the first worksheet. I have a sheet that is going
to host all my data (accounting categories with corresponding account
numbers). I use the account numbers as the lookup value. The table is then
one of the sheets in the workbook, named for the year (2009, 2010, etc.).
Now here's where it gets tricky. I have to other values. The first is the
accounting period number, which is what I have been using in the past. Those
13 numbers are the first row across the top. The second number is going to
be the week in the period (1, 2, 3, or 4) . So I want to look for a value in
the 2009 sheet, for period 9, week 2. How would I go about doing this? Is
it even possible? For reference, here is the formula that I have been using
VLOOKUP(A10,INDIRECT("'"&$P$3&"'!$A$1:$P$165"),MATCH($P$4,INDIRECT("'"&$P$3&"'!$A$1:$O$1"),0),FALSE)
Where $P$3 is the year and $P$4 is the period.
$A$1:$P$165 is the table with all the values.
$A$1:$O$1 is the first row of the worksheet with the numbers 1-13.
Thanks in advance.
value in a different worksheet based on two values in the first worksheet.
Now I need to figure out how to look up a value in a different worksheet
based on three values in the first worksheet. I have a sheet that is going
to host all my data (accounting categories with corresponding account
numbers). I use the account numbers as the lookup value. The table is then
one of the sheets in the workbook, named for the year (2009, 2010, etc.).
Now here's where it gets tricky. I have to other values. The first is the
accounting period number, which is what I have been using in the past. Those
13 numbers are the first row across the top. The second number is going to
be the week in the period (1, 2, 3, or 4) . So I want to look for a value in
the 2009 sheet, for period 9, week 2. How would I go about doing this? Is
it even possible? For reference, here is the formula that I have been using
VLOOKUP(A10,INDIRECT("'"&$P$3&"'!$A$1:$P$165"),MATCH($P$4,INDIRECT("'"&$P$3&"'!$A$1:$O$1"),0),FALSE)
Where $P$3 is the year and $P$4 is the period.
$A$1:$P$165 is the table with all the values.
$A$1:$O$1 is the first row of the worksheet with the numbers 1-13.
Thanks in advance.