Selected Answer
Ramzein,
Please see (and try) the attached file.
If the Invoice sheet (Sheet13) is protected then you need to unlock the sheet before changingthe contents you need cleared.
The extra code in bold below will unlock the Invoice sheet (and re-lock it, allowing only unprotected cells to be entered). For easier use, I've added a string variable myPassword assuming you will use a password to make protection effective. (If not, you could replace myPassword with "" in the code).
The macro to copy data to the Inventory sheet works even if you protect the Invoice sheet.
Sub cleardata()
'
' cleardata Macro
'
'Dim myPassword As String
myPassword = "" 'If a password a*? is used to protect then change to ("a*?")
Sheet13.Activate 'In case macro is called from elsewhere
Sheet13.Unprotect Password:=myPassword 'Unlock sheet
Range("G47,E20,H20,H34:H43,G34:G43,F34:F43,D34:D43,E49,E54").Select
Range("E54").Activate
Selection.ClearContents
Range("D34").Select
Sheet13.Protect Password:=myPasword, Contents:=True ' Reapply the password here, allowing only unprotected cells to be selected
End Sub