Deleting/Clear Contents in Another column on Same row of Worksheet Change Event

USFengBULLS

Board Regular
Joined
May 7, 2018
Messages
66
Office Version
  1. 365
Platform
  1. Windows
Hello,
I am trying to have contents in a cell in column 9 (Column I) to delete once the user selects SUBMITTED from a in cell drop down list over in column L.
Once the user selects SUBMITTED it needs to delete the contents in Column I or 9 on that same row.
I have this working for when it calls other subs but I need help on finishing the Public Sub SUBMITTED at the bottom of this post.


Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("L:L")) Is Nothing Then
If Target.Count > 1 Then Exit Sub
Select Case Target.Value
Case "SUBMITTED": Call SUBMITTED(Target.Row)
Case "APPROVED - FV Req.": Call APPROVED(Target.Row)
Case "APPROVED - NO FV Req.": Call APPROVED(Target.Row)
Case "RESUBMITTED": Call REVISED(Target.Row)
End Select
End If
End Sub


Public Sub SUBMITTED(trow As Double)


Range(Cells(trow, 9)).ClearContents


End Sub
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
What is the problem you have with the Public Sub SUBMITTED code?
 
Upvote 0
Getting a run-time error 1004
Method 'Range' of object'_Global' Failed

Just need it to delete/clear the contents of the cell in that column I or 9 of the same row that they just changed to Submitted in the drop down list of Column L.
So if in cell L13 they just changed to Submitted, the contents in Cell I13 needs to be deleted or set to Blank ""
 
Upvote 0
Try
Code:
Cells(trow, 9).ClearContents
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
Or

Code:
Public Sub SUBMITTED(trow As Double)
    Range("I" & trow).ClearContents
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top