Hi you could use this code to loop through all cells and return the values.
However i cant for the life of me remember why this does not work.
Its to do with you having tables.
if you done away with the tables and all ranges were formatted the same way then this should work.
your date formats are not the same between customer & price sheet that is also causing a problem.
Sub ProductPrice()
Dim ws As Worksheet
Dim lastrow As Integer
Dim Pricerng As Range, cell As Range
lastrow = Sheet19.Cells(Rows.Count, 1).End(xlUp).Row
Set Pricerng = Sheet19.Range("A2:B" & lastrow)
For Each ws In ThisWorkbook.Worksheets
If InStr(1, ws.Name, "Customer") > 0 Then
For Each cell In ws.Range("A2:A" & ws.Cells(Rows.Count, 1).End(xlUp).Row)
cell.Offset(, 2).Value = Application.VLookup(cell.Value, Pricerng, 2, True)
Next cell
End If
Next
End Sub
Bookmarks