I am trying to perform, in Access, the equivalent of a HLookup combined with a Match function in Excel. Converting and automating a process I originated in Excel into Access, but its been several years since I used Access regularly. Here's the data and what I am trying to do....
Table [Constants] contains field "UniqKey" with the following fields which represent all possible season codes (S1-S7):
UniqKey S1__S2__ S3__S4__S5__S6__S7
1_______10__10__9___8___8___8___9
2_______10__10__9___8___8___8___9
3_______8___8___8___8___8___8___8
4_______10__10__10__10__10__10__10
5_______5___5___5___4___4___4___5
I want to query the value of "SsonCd" in another table called [PrdctnData] that could be any individual value of S1-S7 to return the result "GrwWks" in that field that matches the unique key.
UniqKey SsonCd
1_______S2
2_______S3
3_______S4
4_______S2
5_______S5
It should return:
UniqKey GrwWks
1_______10
2_______9
3_______8
4_______10
5_______4
This is:
=HLOOKUP(AO6,SsonLkup,MATCH(C6,UniqueKey,FALSE),FALSE)
in Excel
Where
AO6=cell reference of "SsonCd"
SsonLkup = named array of S1-S7
C6 = UniqKey
UiqueKey = named array of UniqKey's
but I am struggling with the Access/Sql equivalent.
Attempting to return the production time of units that can vary in production time depending upon the time of year they go into production.
Thanks in advance -
Asoul
Table [Constants] contains field "UniqKey" with the following fields which represent all possible season codes (S1-S7):
UniqKey S1__S2__ S3__S4__S5__S6__S7
1_______10__10__9___8___8___8___9
2_______10__10__9___8___8___8___9
3_______8___8___8___8___8___8___8
4_______10__10__10__10__10__10__10
5_______5___5___5___4___4___4___5
I want to query the value of "SsonCd" in another table called [PrdctnData] that could be any individual value of S1-S7 to return the result "GrwWks" in that field that matches the unique key.
UniqKey SsonCd
1_______S2
2_______S3
3_______S4
4_______S2
5_______S5
It should return:
UniqKey GrwWks
1_______10
2_______9
3_______8
4_______10
5_______4
This is:
=HLOOKUP(AO6,SsonLkup,MATCH(C6,UniqueKey,FALSE),FALSE)
in Excel
Where
AO6=cell reference of "SsonCd"
SsonLkup = named array of S1-S7
C6 = UniqKey
UiqueKey = named array of UniqKey's
but I am struggling with the Access/Sql equivalent.
Attempting to return the production time of units that can vary in production time depending upon the time of year they go into production.
Thanks in advance -
Asoul