ColumbiaDiver
Technical User
Hi all,
I’m having a problem with VLOOKUP in Excel 2003 and was hoping someone might have an idea how to resolve it or at least point me in the right direction.
Our HR department utilizes two different systems for tracking staff time based on cost center and division. The data goes from a client server application to an IBM AS/400. I have a RPG program that does a conversion from the client server application to our HR system and I need to combine information from both systems into an Excel spreadsheet.
For example on the client server side the software uses the code Sc to specify clinical Information when the data file is imported to the AS/400 a program is run against the data file that says wherever you see code Sc in the client server data file change it to division 70 cost center 830. Once the entire file has been changed it then moves the data into the AS/400 payroll data.
Our HR department needs an Excel worksheet that contains the following:
1. The alpha division/cost center
2. The associated numeric division/cost center
3. The cost center description
4. Staff hours for that division and cost center.
The problem is that the combined information doesn’t exist on either system in its entirety.
In order to work around this issue I am trying the following:
I extracted the cost center information from the AS/400 translation table which contains the alpha cost center/division, the numeric costs center/division it equates to and the cost center description which is dumped into a worksheet I named Codes. Using the above example:
Column 1 = Sc (alpha cost center/division)
Column 2 = clinical Information (cost center/division description)
Column 3 = 70870 (numeric cost center/division)
I named this range Codes
I then have a second worksheet name Report that contains the following:
Column A = Employee name
Column B = Date worked
Column C Division (alpha)
Column D = Cost Center (alpha)
Column E = columns C and D, combined (which I created)
Example column C contains S and Column D contain c, so column E contains Sc.
Column E = Department. This is where I use my first VLOOKUP to pickup the department description from the Codes worksheet referenced above.
The formula is: =IF(EXACT(E2,VLOOKUP(E2,Codes,1,FALSE))=TRUE,VLOOKUP(E2,Codes,2,FALSE),"No Exact Match")
Cell E2 contain the code Sc which on the Codes worksheet equals CLINICAL INFORMATION for the description. Using the above VLOOKUP Column E should populate the description with the description from the codes worksheet, (CLINICAL INFORMATION) but it returns No Exact Match. On the next cell E3 the code is SC which on the codes worksheet equals CAFETARIA correctly populates the Department column.
This only happens in instances where the same code exists on the Codes worksheet in both upper and lower case. For example SC and Sc, IC and Ic etc. In all instances where the code does not exist in both upper/lower case the VLOOKUP returns the correct value.
I’ve searched the net trying to see what I’m missing, but from everything I can gather this should work.
Sorry for the length of the post, I’d rather give too much information than not enough. Any help/information is much appreciated.
Thanks
Gordon
I’m having a problem with VLOOKUP in Excel 2003 and was hoping someone might have an idea how to resolve it or at least point me in the right direction.
Our HR department utilizes two different systems for tracking staff time based on cost center and division. The data goes from a client server application to an IBM AS/400. I have a RPG program that does a conversion from the client server application to our HR system and I need to combine information from both systems into an Excel spreadsheet.
For example on the client server side the software uses the code Sc to specify clinical Information when the data file is imported to the AS/400 a program is run against the data file that says wherever you see code Sc in the client server data file change it to division 70 cost center 830. Once the entire file has been changed it then moves the data into the AS/400 payroll data.
Our HR department needs an Excel worksheet that contains the following:
1. The alpha division/cost center
2. The associated numeric division/cost center
3. The cost center description
4. Staff hours for that division and cost center.
The problem is that the combined information doesn’t exist on either system in its entirety.
In order to work around this issue I am trying the following:
I extracted the cost center information from the AS/400 translation table which contains the alpha cost center/division, the numeric costs center/division it equates to and the cost center description which is dumped into a worksheet I named Codes. Using the above example:
Column 1 = Sc (alpha cost center/division)
Column 2 = clinical Information (cost center/division description)
Column 3 = 70870 (numeric cost center/division)
I named this range Codes
I then have a second worksheet name Report that contains the following:
Column A = Employee name
Column B = Date worked
Column C Division (alpha)
Column D = Cost Center (alpha)
Column E = columns C and D, combined (which I created)
Example column C contains S and Column D contain c, so column E contains Sc.
Column E = Department. This is where I use my first VLOOKUP to pickup the department description from the Codes worksheet referenced above.
The formula is: =IF(EXACT(E2,VLOOKUP(E2,Codes,1,FALSE))=TRUE,VLOOKUP(E2,Codes,2,FALSE),"No Exact Match")
Cell E2 contain the code Sc which on the Codes worksheet equals CLINICAL INFORMATION for the description. Using the above VLOOKUP Column E should populate the description with the description from the codes worksheet, (CLINICAL INFORMATION) but it returns No Exact Match. On the next cell E3 the code is SC which on the codes worksheet equals CAFETARIA correctly populates the Department column.
This only happens in instances where the same code exists on the Codes worksheet in both upper and lower case. For example SC and Sc, IC and Ic etc. In all instances where the code does not exist in both upper/lower case the VLOOKUP returns the correct value.
I’ve searched the net trying to see what I’m missing, but from everything I can gather this should work.
Sorry for the length of the post, I’d rather give too much information than not enough. Any help/information is much appreciated.
Thanks
Gordon