Hello. This involves expense data downloaded from SAP into Excel. The data has cost codes associated with it. Data can be pulled in for preset departments, but it doesn't (yet) allow one to selectively pick different departments and download to the same spreadsheet. So, they are downloaded separately and pasted together. The problem is that the cost codes don't line up across rows as departments can have different types of expenses. They all though come from the same master list and which can be obtained by putting the total company expenses in the spreadsheet. Codes will not always be in sequential order.
The ordering of the cost costs and subtotals are predetermined. I've created a sample with the data correctly pasted from Dept A on the right into the desired row. The exception occurs on the row with Code 12367 for which there is no corresponding code on the right and the cell needs to be blank. How can I match up the codes on the right with those on the left and paste a value? I've tried VLOOKUP and some misguided routes, but haven't succeeded. Any and all input welcome. Thanks.
------------------------------Copied
----------------Total Co.----Dept A---------------------------Dept A
Code----------Expense-----Expense-------Code-----------Expense
12345------------112-----------50----------12345------------50
12348------------138-----------12----------12348------------12
12367------------112---------BLANK--------12403------------25
12403------------115-----------25---------12408-------------35
12408------------217-----------35---------Subtotal----------122
Subtotal----------694----------122
The ordering of the cost costs and subtotals are predetermined. I've created a sample with the data correctly pasted from Dept A on the right into the desired row. The exception occurs on the row with Code 12367 for which there is no corresponding code on the right and the cell needs to be blank. How can I match up the codes on the right with those on the left and paste a value? I've tried VLOOKUP and some misguided routes, but haven't succeeded. Any and all input welcome. Thanks.
------------------------------Copied
----------------Total Co.----Dept A---------------------------Dept A
Code----------Expense-----Expense-------Code-----------Expense
12345------------112-----------50----------12345------------50
12348------------138-----------12----------12348------------12
12367------------112---------BLANK--------12403------------25
12403------------115-----------25---------12408-------------35
12408------------217-----------35---------Subtotal----------122
Subtotal----------694----------122