how to copy matching data in next sheet

T

TFMR

Dear All,

I have 3 sheets which contains the vehicles no, I want to copy only that
vehicle no. in 4th sheet, which is exist in 3 sheets.

Thanks
 
J

JLGWhiz

The description of the task is too vague to offer a real solution. You can
copy a range from sheet 1 to sheet 4 with the following syntax.

Sheets("Sheet1").Range("A2").Copy _
Sheets("Sheet4").Range("B2")

Or if the data you want to copy is somewhere in a known range:

Dim c As Range
vehiclesno = Range("A1").Value
Set myKnownRange = Sheets(1).Range("A2:A100")
For Each c In myKnownRange
If c.Value = vehiclesno Then
c.Copy Sheets(4).Range("A" & Cells(Rows.Count, 1),End(xlUp).Row)
End If
Next

But to give you code you can use, we would have to know how the data is
organized on sheets 1 - 3, if it is sorted, if vehicle nos are all in the
same column, etc. Remember, we cannot see your worksheets.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top