Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How can I Auto insert an "X" in a cell by just ONE left click????

How can I Auto insert an "X" in a cell by just ONE left click on the mouse on
that cell?

And once this is set up, some of these 'X' inserts will have a 'Yes" and
"No" cells that "ONLY ONE" can have an "X" in.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How can I Auto insert an "X" in a cell by just ONE left click????

Add this event code to your worksheet module to get an "X" in any cell you
select in the range A1:A10.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const myRange As String = "A1:A10"
On Error GoTo endit
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(myRange)) Is Nothing Then
Target.Value = "X"
End If
endit:
Application.EnableEvents = True
End Sub

Don't understand the second part about no and yes and only one with an "x"

A "Yes" value is to be turned into an "X" value unless it's a "No" value in
which case it stays the same or something like that?


Gord Dibben MS Excel MVP

On Sun, 13 Apr 2008 11:27:00 -0700, Mac 5430 <Mac
wrote:

How can I Auto insert an "X" in a cell by just ONE left click on the mouse on
that cell?

And once this is set up, some of these 'X' inserts will have a 'Yes" and
"No" cells that "ONLY ONE" can have an "X" in.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How can I Auto insert an "X" in a cell by just ONE left click?

I am lost??

"Gord Dibben" wrote:

Add this event code to your worksheet module to get an "X" in any cell you
select in the range A1:A10.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const myRange As String = "A1:A10"
On Error GoTo endit
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(myRange)) Is Nothing Then
Target.Value = "X"
End If
endit:
Application.EnableEvents = True
End Sub

Don't understand the second part about no and yes and only one with an "x"

A "Yes" value is to be turned into an "X" value unless it's a "No" value in
which case it stays the same or something like that?


Gord Dibben MS Excel MVP

On Sun, 13 Apr 2008 11:27:00 -0700, Mac 5430 <Mac
wrote:

How can I Auto insert an "X" in a cell by just ONE left click on the mouse on
that cell?

And once this is set up, some of these 'X' inserts will have a 'Yes" and
"No" cells that "ONLY ONE" can have an "X" in.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How can I Auto insert an "X" in a cell by just ONE left click?

Right-click on your sheet tab and "View Code".

Copy/paste the code into that module. Edit the "A1:A10" to suit.

Alt + q to return to the Excel window.

When you select any cell(left-click ONE time) in myRange and an "X" will be
inserted.


Gord

On Sun, 13 Apr 2008 13:10:25 -0700, Mac 5430
wrote:

I am lost??

"Gord Dibben" wrote:

Add this event code to your worksheet module to get an "X" in any cell you
select in the range A1:A10.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const myRange As String = "A1:A10"
On Error GoTo endit
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(myRange)) Is Nothing Then
Target.Value = "X"
End If
endit:
Application.EnableEvents = True
End Sub

Don't understand the second part about no and yes and only one with an "x"

A "Yes" value is to be turned into an "X" value unless it's a "No" value in
which case it stays the same or something like that?


Gord Dibben MS Excel MVP

On Sun, 13 Apr 2008 11:27:00 -0700, Mac 5430 <Mac
wrote:

How can I Auto insert an "X" in a cell by just ONE left click on the mouse on
that cell?

And once this is set up, some of these 'X' inserts will have a 'Yes" and
"No" cells that "ONLY ONE" can have an "X" in.




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
Auto insert "CreateDate" to Footer David Excel Discussion (Misc queries) 1 August 22nd 07 11:02 AM
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F daves Excel Discussion (Misc queries) 3 April 24th 07 04:52 AM
"Control" plus "click" doesn't allow me to select multiple cells Ken Cooke New Users to Excel 0 September 25th 06 04:46 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 10:59 PM.

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"