hello there,
i am trying to paste a cell based on another cell value
if a cell value is yes i want to copy and paste another cell value and paste it in another sheet, with this code it gets copied either way.
If Range("E17").Value = "yes" Then
MsgBox "HELLO"
xSheet.Cells(9, "E").Copy
AccSheet.Cells(AccLastRow + 1, "O").PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range("E9:E15").ClearContents
Else
'clear cells after adding
Range("E9:E15").ClearContents
Exit Sub
End If
i am trying to paste a cell based on another cell value
if a cell value is yes i want to copy and paste another cell value and paste it in another sheet, with this code it gets copied either way.
If Range("E17").Value = "yes" Then
MsgBox "HELLO"
xSheet.Cells(9, "E").Copy
AccSheet.Cells(AccLastRow + 1, "O").PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range("E9:E15").ClearContents
Else
'clear cells after adding
Range("E9:E15").ClearContents
Exit Sub
End If