VBA Excel - How do I clear the contents of a cell but retain the ability to edit that cell after it is cleared?

Sfusco

New Member
Joined
Jul 29, 2021
Messages
2
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hello -
I have a drop down with two options. The two options are "Good" and "No good". If "Good" is selected the adjacent three cells are filled with "N/A". I want to have the second drop down option "No good" trigger clearing the adjacent three cells, yet allow me to utilize the drop downs that are set for those three cells after they are cleared. The code I have written clears the three adjacent cells, and continues to clear the values I select from the dropdowns. Net result is I can't populate the adjacent three cells. I don't know how to work around this issue. I am currently using the worksheet_SelectionChange event. I have tried to toggle the Application.EnableEvents around the actionable code, but I am still not able to get it to work properly. Any guidance would be greatly appreciated.
Thanks so much for any help.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi & welcome to MrExcel.
If the drop downs are data validation, then use the worksheet change event, rather the selectionchange event.
 
Upvote 0
Hi & welcome to MrExcel.
If the drop downs are data validation, then use the worksheet change event, rather the selectionchange event.
Hello Fluff -

Unlike your name, you are sharp as a tack. Thank you so very much for your timely and accurate response. Your advise did the trick. I can't say that I understand why that simple change made the difference, but it works like a charm now.

and thanks for the welcome!

Kindest regards
 
Upvote 0
With the selection change, when you go to select something from the drop down, it triggers the event thus clears your selection.
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,454
Members
449,083
Latest member
Ava19

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