I have a list of incoming inventory with part numbers and corresponding incoming amounts in one sheet and a comprehensive part list with current inventory amounts in another. I want to be able to run code that adds the incoming inventory amounts to the current inventory. So far, I am able to get the code to assign the new inventory value to a variable cur_inv
but I cannot get it to push that new value to the correct cell. Here's the code:
Sub Test()
ActiveSheet.Range("A1").Select
Do Until IsEmpty(ActiveCell)
lookfor = ActiveCell.Offset(0, 1).Value
Set r = Sheets("Available Inventory").Range("Lookup")
cur_inv = Application.WorksheetFunction.VLookup(lookfor, r, 2, False)
new_inv = ActiveCell.Offset(0, 2).Value
cur_inv = new_inv + cur_inv
ActiveCell.Offset(1, 0).Select
Loop
End Sub