Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Autocomplete

I In column I, I have a dropdown menu listing either "yes" or "no".

What I would like to do is, when any other cell within that row contains
data, for the cell in colum I to change automatically to "no" until user
changes it to "yes"

So for example, if I enter any data into cells A1 or B1 or C1 etc etc, then
cell I1 will automatically fill with the word "no"

Any suggestions? I have been told I can do this with a worksheet_change
event but ain't got the foggiest.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Autocomplete

Right click on the sheet tab and select view code. In the resulting module,
in the upper left dropdown, select Worksheet and in the upper right dropdown
select Change (not selectionchange)

this will cause the declaration of the Change event of which you speak:

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

so within this declaration you would put code like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If target.count 1 then exit sub
if target.column =1 and target.column <= 3 then
if application.CountA(cells(target.row,1).Resize(1,3) ) 0 then
cells(target.row,"I").value = "no"
end if
end if
End Sub

--
Regards,
Tom Ogilvy


"Worzel Gummidge" wrote in message
.uk...
I In column I, I have a dropdown menu listing either "yes" or "no".

What I would like to do is, when any other cell within that row contains
data, for the cell in colum I to change automatically to "no" until user
changes it to "yes"

So for example, if I enter any data into cells A1 or B1 or C1 etc etc,

then
cell I1 will automatically fill with the word "no"

Any suggestions? I have been told I can do this with a worksheet_change
event but ain't got the foggiest.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Autocomplete

Thanks Tom

"Tom Ogilvy" wrote in message
...
Right click on the sheet tab and select view code. In the resulting
module,
in the upper left dropdown, select Worksheet and in the upper right
dropdown
select Change (not selectionchange)

this will cause the declaration of the Change event of which you speak:

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

so within this declaration you would put code like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If target.count 1 then exit sub
if target.column =1 and target.column <= 3 then
if application.CountA(cells(target.row,1).Resize(1,3) ) 0 then
cells(target.row,"I").value = "no"
end if
end if
End Sub

--
Regards,
Tom Ogilvy


"Worzel Gummidge" wrote in message
.uk...
I In column I, I have a dropdown menu listing either "yes" or "no".

What I would like to do is, when any other cell within that row contains
data, for the cell in colum I to change automatically to "no" until user
changes it to "yes"

So for example, if I enter any data into cells A1 or B1 or C1 etc etc,

then
cell I1 will automatically fill with the word "no"

Any suggestions? I have been told I can do this with a worksheet_change
event but ain't got the foggiest.






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
Autocomplete Jennifer[_5_] New Users to Excel 0 July 23rd 11 02:10 PM
AutoComplete Nimish Excel Discussion (Misc queries) 1 September 21st 06 12:28 AM
autocomplete Dantz Excel Programming 2 October 6th 05 04:21 AM
Using autocomplete njamy Excel Worksheet Functions 1 July 22nd 05 09:40 PM
autocomplete? Gary Excel Discussion (Misc queries) 1 July 19th 05 01:08 AM


All times are GMT +1. The time now is 07:22 AM.

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"