Clear cell value if drop down is selected again

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,226
Office Version
  1. 2007
Platform
  1. Windows
Hi,
Ive attached a screenshot to assist you
I have 2 drop down boxes.
G13 & M11
Currently A BAKALO 001 is shown in cell G13 & BIKE is shown in cell M11

If the user decides to select again using drop down in cell G13 so TOM JONES now replaces A BAKALI 001 currently BIKE is still shown in cell M11
It needs to be cleared so the user can make the correct selection
Thanks
 

Attachments

  • EaseUS_2023_08_ 8_12_23_52.jpg
    EaseUS_2023_08_ 8_12_23_52.jpg
    36.8 KB · Views: 9

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Paste this into the SHEET module. It is best to give those ranges names and then reference the names in the macro. This allows you to move those anywhere and the macro won't break

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
  
  If Not Intersect(Target, Range("G13")) Is Nothing Then
    Application.EnableEvents = False
    
    If Range("G13").Value <> "" Then
      Range("M11").Value = ""
    End If
    
    Application.EnableEvents = True
  End If
  
  
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,215,137
Messages
6,123,254
Members
449,093
Latest member
Vincent Khandagale

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