Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Works like a charm man! REALLY REALLY thanks! Just a question: is there any
way to make it work like if I had hit enter after typing the "x"? Right now when I type the X on the box I have to either press enter or select a different column for the script to run. Just a "lazyness" question =) But as I don't know VB programming I'd like to learn a bit... I was looking your code, and I couldn't identify where it says that only the "x" can do the selection, since I tried with other stuff and it didn't work (not that I want to, I just tested... x works as I wanted). I also didn't get where it specifies that I can have two X's, one in each column, but not 2 x's in the same column, or how the x in the first column doesn't exclude the x in the second column. Thanks in advance! "vezerid" wrote: You can use the following VBA event procedure for this: Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A2:B13")) Is Nothing Then v = Target.Value col = Target.Column Application.EnableEvents = False Range(ActiveSheet.Cells(2, col), ActiveSheet.Cells(13, col)).ClearContents Target.Value = v Application.EnableEvents = True End If End Sub To install: Right click on the sheet tab. Choose View Code... This takes you to the VBA IDE. Paste the above code in the window. It should operate like you want from this point on. HTH Kostis Vezerides |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a way to make a cell stand out when it is selected | Excel Discussion (Misc queries) | |||
how do i make a drop down list of selected names no repeatition | Excel Worksheet Functions | |||
how do i make it so that when a sheat is selected either via link or tab, that xlLastCell is selected. the last on the sheet. | Excel Worksheet Functions | |||
how read value from last selected cell? It is possible? how get adress last selected cell? | New Users to Excel | |||
Finding min,max in an array using selected rows from a table | Excel Worksheet Functions |