View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
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.