I see. Try this for Column AC:
=VLOOKUP(AA2,'yourlookupsheet'!$A:$N,MATCH (Z2,'yourlookupsheet'!$A$1:$N$1))
I'm going to deconstruct it from right to left.
MATCH(Z2,'yourlookupsheet'!$A$1:$N$1) returns a reference number looking for
the value in column Z2, looking at the range A$1:N$1. I'm assuming that
A$1:N$1 is this:
[empty cell A1] A B 1 1D 2 2D U97 U98 U99 U00 BU1 BU1D BU2 BU2D
So, MATCH("A",'yourlookupsheet'!$A$1:$N$1) would return 2.
MATCH("2D",'yourlookupsheet'!$A$1:$N$1) would return 7.
VLOOKUP(AA2,'yourlookupsheet'!$A:$N...) looks at the value in column AA2
(values such as "AA","BB","CC", etc) and returns a value from range A:N,
where you tell it how many columns to go. The result of the MATCH function
should feed you that info.
HTH
PAMR said:
I don't think that will accomplish the task. The look up
table has the 14(group level) Z values in columns and the
5 z values (tier within group) in the rows.
The look up table has values of AA in columns and value
of z in rows the price associated with the specific
group/tier is the lookup result. I don't think I can
flip flop the values because the $ varys first with which
group a participant is in, then what level of
particpation they have chosen.
A B 1 1D 2 2D U97 U98 U99 U00 BU1 BU1D BU2 BU2D
AA $ $ $ $ $ $ $ $ $ $ $ $ $ $
BB
CC
DD
EE
-----Original Message-----
I'm not sure what your environment is, but here's what
I'd do in your
situation.
I would create a seperate sheet containing the lookup
data for column AA.
For instance (I'm making up value for the "DATA" column):
Z_VALUE DATA
---------------------------
1 A
2 B
1D C
....
You can repeat that for all 14 values.
Then you'd put the following function in column AA:
=VLOOKUP(Z2,'Data Match Sheet'!$A:$B,2)
That should put the right value in your column AA.
Then I would put the following function in column AB:
=Z2&AA2
This would generate values like this:
1A
2B
1DC
.... etc.
Use the value in that column for your other lookup.
:
Need a formula to look at the value in column Z, which
has 14 variables, then look at the value in column AA,
which has 5 variables, then depending on the
combination
look up the corresponding value which resides on a
different sheet of the workbook and place that value
in
column AC.
Before I had so many variables in column Z, I was able
to
get the job done with this formula
=IF(Z2="1",VLOOKUP(AA2,'Sheet 4'!$B$14:$H$18,4),IF
(Z2="1D",VLOOKUP(AA2, 'Sheet 4'!$B$14:$H$18,5),IF
(Z2="2",VLOOKUP(AA2,''Sheet 4'!$B$14:$H$18,6),IF
(Z2="2D",VLOOKUP(AA2, 'Sheet 4'! $B$14:$H$18,7),"CHECK
COL
Z & AA"))))
.