Clear content in a dependent cell when new selection is made

JLHSolutions

New Member
Joined
Feb 6, 2019
Messages
15
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hello,

I have just started using Excel to track the status of our jobs. I am still learning how to do things using Excel as I came from using FileMaker. What I have right now is a List that gives me choices for the status of the job. This is in column H. In column J, I have a value list that changes depending on what is selected in column H. This part works great.

What I am trying to do is to clear the selection in Column J when the selection changes in column H. From what I can gather on Google, I need to use VB script, but I haven't been able to figure out what to use to write this code. I only want it to change the value in the current row as I am using each row for the a different job. I will have many rows visible at one time as we have lots of jobs that are in various stages.

I am hoping someone here can help me with this. I don't think its too difficult, but as I am new to doing this type of stuff in Excel, I am stumbling around trying to figure it out.

Thanks in advance.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Strange! Using the file you uploaded, I just tried filtering on the headers in row 8 without any problems. Do you have any other macros in the workbook?
 
Upvote 0
The macro below should take care of the error problem when deleting a row. I tried filtering several times without any problems. Also, you should be aware that you cannot "Undo" any action performed by a macro.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("H:H")) Is Nothing Then Exit Sub
    On Error GoTo errHandler
    Application.EnableEvents = False
    Target.Offset(0, 2).ClearContents
errHandler:
    Application.EnableEvents = True
End Sub
 
Upvote 0
Thank you for all your help! I tried that and so far so good! I've been using it a little yesterday and today. No errors so far.
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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