PDA

View Full Version : [SOLVED:] Check & Copy Data



drums4monty
09-24-2013, 08:11 AM
Hi

I have a workbook with 2 worksheets. In Col A of Sheet 1 is a ref number and Col C of Sheet 2 has a ref number. I need to check both sheets and if the ref number appears on both sheets I need to copy the data from Sheet 2 Cols E, F & G to Sheet 1 Cols C, D & E.
The sheets may be of differing lengths.

Can anyone out there help?

Many thanks

Alan

p45cal
09-24-2013, 09:56 AM
in sheet1 col C, something along the lines of (say starting in C2):
=vlookup(A2,sheet2!$C$2:$G$2000,3,false)
and in sheet1 column D (D2):
=vlookup(A2,sheet2!$C$2:$G$2000,4,false)
and in sheet1 column E (E2):
=vlookup(A2,sheet2!$C$2:$G$2000,5,false)

and copy down. You'll get some errors when the ref isn't found but you can put an iferror around the formula.
Then you can copy/paste-special/Values to remove the formulae.

drums4monty
09-24-2013, 03:26 PM
Thanks p45cal, I will give your locution a try.

drums4monty
09-25-2013, 01:25 AM
Hi p45cal

Your solution is not working, all it does is put the formula in the cells. Of course I could be entering it wrong but I have typed it as suggested.

p45cal
09-25-2013, 02:17 AM
Hi p45cal

Your solution is not working, all it does is put the formula in the cells. Of course I could be entering it wrong but I have typed it as suggested.
So you're saying that on the sheet, instead of seeing the result of the formula, you're seeing the formula itself?
Are the cells where you're entering the formula formatted as text? They shouldn't be.
I've just tested this and it works here.

drums4monty
09-25-2013, 02:21 AM
Hi p45cal

Sorry about previous post, it appears that it does work after all. Many thanks.