Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MP MP is offline
external usenet poster
 
Posts: 39
Default Clearing cells when selecting from a drop down list

I have cells on the worksheet that when you select an option from a drop down
list you type in a response. I need to clear these cells as a different
option is selected from the drop down list
i.e A1 - drop down list with options
A2 - cell will change with a a question depending upon what was selected
from A1
A3 - has response typed in i.e like the number 4 - this is what I need to
clear when someone goes back to A1 and selects something different

Thanks in advance
MP
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Clearing cells when selecting from a drop down list

Try this macro:

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrHandler
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
Application.EnableEvents = False
Target.Offset(0, 2).ClearContents
End If
ErrHandler:
Application.EnableEvents = True
End Sub

This assumes you have drop downs in the range A1:10. Change range to suit.

To use this, select the sheet where you want this to happen.
Right click on the sheet tab
Select View Code
Paste the above code into the window that opens
Hit ALT Q or close the window by clicking the X to return to Excel.

--
Biff
Microsoft Excel MVP


"MP" wrote in message
...
I have cells on the worksheet that when you select an option from a drop
down
list you type in a response. I need to clear these cells as a different
option is selected from the drop down list
i.e A1 - drop down list with options
A2 - cell will change with a a question depending upon what was selected
from A1
A3 - has response typed in i.e like the number 4 - this is what I need to
clear when someone goes back to A1 and selects something different

Thanks in advance
MP



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Jump to next cell after selecting from drop down list Sandie Excel Worksheet Functions 8 November 16th 06 04:06 PM
Drop Down List choice selecting another drop down list CVD0722 Excel Worksheet Functions 3 October 31st 06 01:02 PM
clearing blanks in drop-down list Richard Walker Excel Discussion (Misc queries) 1 May 22nd 06 11:56 PM
Clearing the Values in a Drop - Down List Sagu Excel Discussion (Misc queries) 4 March 31st 06 03:32 AM
Selecting a line from a drop-down list Jonibenj Excel Discussion (Misc queries) 4 December 11th 05 05:46 PM


All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"