Matching/Copying data across worksheets

Closed
tycelchu Posts 4 Registration date Tuesday April 10, 2012 Status Member Last seen April 10, 2012 - Apr 10, 2012 at 05:45 AM
jp26198926 Posts 18 Registration date Wednesday August 5, 2009 Status Member Last seen April 10, 2012 - Apr 10, 2012 at 09:44 AM
Hello,

I hope someone can help me with a little Excel problem I'm struggling with regarding some reports I am trying to pull together, here is a brief explanation:

I have manually combined 4 separate reports into 1 workbook with 4 worksheets (1 for each report). Each row represents a separate job.

The 1st worksheet is an export from our own Access database, the 3 others come from external reports.

Whilst each report/worksheet contains different sets of data, 1 column in each worksheet contains 'CSR' or 'Site ID' numbers. These numbers can be used to match the jobs - however a) not every worksheet has every number b) some numbers may appear more than once on the same worksheet (these are essentially returns to the same job).

The 1st worksheet also has a column with OPID numbers (Column A), these are unique numbers that we have paired to a CSR or Site ID number.

I want to compare the numbers in the CSR column of the 1st worksheet (Column B of Sheet 1) with the CSR columns in the other worksheets and where there is a match, copy/add the corresponding OPID number to a blank column in each worksheet.

What would be the best way to do this? I have found a solution to a similar problem that uses a VLOOKUP but can't get my head around how to apply it to my sheets.

Thanks in advance for your time and assistance,

Appreciatively,
Ty

3 responses

jp26198926 Posts 18 Registration date Wednesday August 5, 2009 Status Member Last seen April 10, 2012 8
Apr 10, 2012 at 06:09 AM
Hello,
is the CSR column on the other 3 sheets is in Column A?
only those 3 other sheets have a repeatable numbers? not in sheet1?
0
tycelchu Posts 4 Registration date Tuesday April 10, 2012 Status Member Last seen April 10, 2012
Apr 10, 2012 at 07:20 AM
Thanks for your reply.

Yes, the CSR columns are currently all Column A, except from the 1st worksheet where they appear in Column B.

Both the CSR numbers and OPID numbers in the 1st worksheet are all unique/only appear once.
0
jp26198926 Posts 18 Registration date Wednesday August 5, 2009 Status Member Last seen April 10, 2012 8
Apr 10, 2012 at 09:44 AM
Hello

try to put this on the blank column of sheet2, sheet3 and sheet4

=IF(COUNTIF(Sheet1!B$2:B$12,A2),INDIRECT("Sheet1!A" & ROW(INDEX(Sheet1!B$2:B$12,MATCH(A2,Sheet1!B$2:B$12,0)))),"")


in the above code the sheet1 is only 12 rows
0