Hello,
Need assistance with macro to extract data from multiple sheets based on matched criteria and sum up the values.
All vendor data must start from col (C), Below query copies data to other column if no match in first or second sheet.
Hope was able to put my question thru properly..
Attached sample file with output reqd.
Need assistance with macro to extract data from multiple sheets based on matched criteria and sum up the values.
All vendor data must start from col (C), Below query copies data to other column if no match in first or second sheet.
Hope was able to put my question thru properly..
Attached sample file with output reqd.
Code:
Sub test()
Dim c As Range
On Error Resume Next
For Each c In Range("A3:A10").Cells
With Sheets("Chelsea").Columns("F").Find(What:=c.Value)
.Offset(, 2).Copy c.Offset(, 2)
.Offset(, -4).Copy c.Offset(, 3)
With Sheets("John").Columns("F").Find(What:=c.Value)
.Offset(, 2).Copy c.Offset(, 4)
.Offset(, -4).Copy c.Offset(, 5)
With Sheets("David").Columns("F").Find(What:=c.Value)
.Offset(, 2).Copy c.Offset(, 6)
.Offset(, -4).Copy c.Offset(, 7)
End With
End With
End With
Next c
End Sub