LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How to make a table with only one cell to be selected?

Is there a way to make the selection be chosen by a mouse click instead of
typing?

Something like clicking on a desired cell makes it appear the X and
therefore select it just like if I had typed the X and hit enter.

Thanks :)

"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

On Mar 13, 7:24 pm, ghnogueira
wrote:
I know the title is kinda confusing, but I couldn't really think how to
explain in short words what I want.

I have these 2 column ranges (A2:A13 and B2:B13), and I want them to some
kind of selection boxes, where I can type something like an "X" to show
selection. But I want Excel to accept only ONE X per column, like if it was a
HTTP radio box, where you have like 5 different options, but can only choose
1 of them.

e.g.: when I type "x" on cell A3, and type again on cell A7, it
automatically deletes the x on cell A3, or something like that. It may not be
an "x", might be something else. But that's the idea.

Was it clear enough?




 
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
How to make a table with only one cell to be selected? ghnogueira Excel Discussion (Misc queries) 1 March 13th 07 06:53 PM
Is there a way to make a cell stand out when it is selected gkhutton Excel Discussion (Misc queries) 1 November 10th 06 02:30 AM
how do i make a drop down list of selected names no repeatition Mehboob Ellahi Excel Worksheet Functions 2 December 30th 05 04:31 PM
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. Daniel Excel Worksheet Functions 1 July 12th 05 01:30 AM
how read value from last selected cell? It is possible? how get adress last selected cell? Andrzej New Users to Excel 4 May 30th 05 07:28 PM


All times are GMT +1. The time now is 08:51 AM.

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

About Us

"It's about Microsoft Excel"