Sub Bought_1()
Range("D2").Activate
If ActiveCell = vbNullString Then Exit Sub
Selection.Copy
RngB = Range("B2").Value
Sheets("Count sheet").Activate
For Each cell In Range("A2:A23")
If cell.Value = RngB Then
pp = pp + 1
End If
Next
If pp = 1 Then
Sheets("Inventory management").Activate
Range("D2").Activate
Selection.Copy
Sheets("Count sheet").Activate
Range("J2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Inventory management").Activate
Application.CutCopyMode = False
Range("A2").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Count sheet").Select
Range("J1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("J:J").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight, Copyorigin:=xlFormatFromLeftOrAbove
Range("J2").Select
Sheets("Inventory management").Select
Range("D2").Select
Selection.ClearContents
Else
MsgBox "Nothing"
End If
End Sub
this is what i ended up with that solved it all thank you for your help
Ok, so you want it to update the values in the other spreadsheet and the old values go to column H onwards?