V
vivi
Hi there I am having some problems when trying to extract the data I want.
Basically i have these two tables set up:
1. GSTT Raw Data - it contains a list of Asset IDs, its cost center and
other financial infomation.
2. Master Project List - Contains Asset IDs and their Cost Centers
My task is to link the two tables together using the Asset IDs and obtain
the cost centers
The Master Project List is the master list which I need to use for all the
cost centers as the raw data table might not have the correct information.
However, not all the asset ids are in there (some of them are not used
therefore cannot update the master list with the raw data first), therefore
it returns to Error/Blank.
If it is in excel, I will write it as such:
=if(Master Project List! Cost Center = "", 'GSTT Raw Data'!Cost Center,
'Master Project List'!Cost Center)
This will allow me to have one column only in the query.
I have tried to write this in Access and as such:
Cost Center: IIf([TBL_Master_Project_List]![Project Cost
Centre]="",[TBL_Upload_GSTT]![Project Cost
centre],[TBL_Master_Project_List]![Project Cost Centre])
Nevertheless, it will give me the cost center in project master list, but
will not give the raw data's Cost Center if the master list is blank.
Therefore I was wishing to use the vlookup function, but not sure if it
would help and more, i don't know how to do vlookup in Access.
What I want to say is:
=if(iserror(vlookup(GSTT Raw Data!Asset ID,master project
list$A;$B,2,0),GSTT Raw Data!Cost Center,Vlookup(GSTT Raw Data! Asset ID,
master project list$A:$B,2,0)
I hope I make sense as I cannot express this in plain english!!!
Please someone help me...I can't figure it out at all...!!
Thanks a lot in advance
Vivi
Basically i have these two tables set up:
1. GSTT Raw Data - it contains a list of Asset IDs, its cost center and
other financial infomation.
2. Master Project List - Contains Asset IDs and their Cost Centers
My task is to link the two tables together using the Asset IDs and obtain
the cost centers
The Master Project List is the master list which I need to use for all the
cost centers as the raw data table might not have the correct information.
However, not all the asset ids are in there (some of them are not used
therefore cannot update the master list with the raw data first), therefore
it returns to Error/Blank.
If it is in excel, I will write it as such:
=if(Master Project List! Cost Center = "", 'GSTT Raw Data'!Cost Center,
'Master Project List'!Cost Center)
This will allow me to have one column only in the query.
I have tried to write this in Access and as such:
Cost Center: IIf([TBL_Master_Project_List]![Project Cost
Centre]="",[TBL_Upload_GSTT]![Project Cost
centre],[TBL_Master_Project_List]![Project Cost Centre])
Nevertheless, it will give me the cost center in project master list, but
will not give the raw data's Cost Center if the master list is blank.
Therefore I was wishing to use the vlookup function, but not sure if it
would help and more, i don't know how to do vlookup in Access.
What I want to say is:
=if(iserror(vlookup(GSTT Raw Data!Asset ID,master project
list$A;$B,2,0),GSTT Raw Data!Cost Center,Vlookup(GSTT Raw Data! Asset ID,
master project list$A:$B,2,0)
I hope I make sense as I cannot express this in plain english!!!
Please someone help me...I can't figure it out at all...!!

Thanks a lot in advance
Vivi