ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I Auto insert an "X" in a cell by just ONE left click???? (https://www.excelbanter.com/excel-discussion-misc-queries/183573-how-can-i-auto-insert-x-cell-just-one-left-click.html)

Mac 5430

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.

Gord Dibben

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.



Mac 5430[_2_]

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.




Gord Dibben

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.






All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com