Sorry I'm a noob, but I don't have time to learn enough VB to fix my problem. I would really appreciate some help as I'm sure there is a simple fix. I need to Match value from row7 columnA worksheetA to value in row? columnA worksheetB, then copy value from row7 ColumnD worksheetA to row? ColumnQ worksheetB.
Basically I have two worksheets, one is exported from our online store, the other is exported from our inventory management system in the store. I have to change the online store inventory values, to the real values that the in-store system shows. We sell more items in-store, than online. But I need to keep the online store's inventory accurate. Both lists have about 2500 rows that match, but one list has an extra 2500 rows.
I found the following which helps but copy's the matched value in row7 columnA sheetA to row? ColumnQ sheetB: excel vba macro to match cells from two different workbooks and copy and paste accordingly
Sub UpdateInventory()
Dim w1 As Worksheet, w2 As Worksheet
Dim c As Range, FR As Long
Dim d As Long
Application.ScreenUpdating = False
Set w1 = Workbooks("WorksheetA.xlsm").Worksheets("Sheet1")
Set w2 = Workbooks("WorksheetB.xlsm").Worksheets("Sheet1")
For Each c In w1.Range("A7", w1.Range("A" & Rows.Count).End(xlUp))
FR = 0
On Error Resume Next
FR = Application.Match(c, w2.Columns("A"), 0)
On Error GoTo 0
If FR <> 0 Then w2.Range("Q" & FR).Value = c.Offset(, 0)
Next c
Application.ScreenUpdating = True
End Sub