Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default enter text in cell just by selecting cell

When i select a cell i would like the letter X or a number to automatically
insert.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default enter text in cell just by selecting cell

Reference the following thread:

"Macro to Enter text" from 12/13/2007





"dlyon" wrote in message
...
When i select a cell i would like the letter X or a number to
automatically
insert.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default enter text in cell just by selecting cell

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "A1:A10"
Dim cell As Range

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
For Each cell In Target
cell.Value = "X"
Next cell
End If

ws_exit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste into that sheet module. Alt + q to return your sheet.

Adjust the range A1:A10 and the value "X" to suit.


Gord Dibben MS Excel MVP

On Sat, 15 Dec 2007 10:10:01 -0800, dlyon
wrote:

When i select a cell i would like the letter X or a number to automatically
insert.


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
Hit enter in cell & move text down in cell, not go to cell below. raoul_duke Excel Worksheet Functions 4 April 2nd 23 08:37 PM
ENTER TEXT IN A CELL AND GET A VALUE FROM ANOTHER CELL rankin Excel Worksheet Functions 2 October 29th 08 07:01 PM
Enter text in a cell to return a text value in same cell Danno 24/7[_2_] Excel Discussion (Misc queries) 6 May 9th 08 06:26 AM
Copying text from website OR selecting and coping certain text within a cell keri Excel Programming 2 April 12th 07 11:23 PM
Enter value in cell by selecting cell. Greyson Excel Discussion (Misc queries) 2 November 2nd 06 12:01 AM


All times are GMT +1. The time now is 12:32 AM.

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

About Us

"It's about Microsoft Excel"