Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
selection_change adding text to target
Can I use selection_change to modify the current cell?
e.g I want to type 1234 into any cell in column A and have it change to "Test - 1234 - Test" upon leaving the cell TIA Matt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
selection_change adding text to target
Matt,
Copy the code below, right-click the sheet tab, select "View Code" and paste the code into the window that appears. I've use the change event because you talk about typing in and not just selecting as cell HTH, Bernie MS Excel MVP Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub If Target.Cells.Count 1 Then Exit Sub If Target.Value = "" Then Exit Sub Application.EnableEvents = False Target.Value = "Test - " & Target.Value & " - Test" Application.EnableEvents = True End Sub "Matt Williamson" wrote in message ... Can I use selection_change to modify the current cell? e.g I want to type 1234 into any cell in column A and have it change to "Test - 1234 - Test" upon leaving the cell TIA Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel fromula: Adding numbers from list to achieve a target | Excel Discussion (Misc queries) | |||
Excel fromula: Adding numbers from list to achieve a target | Excel Discussion (Misc queries) | |||
Selection_Change? | Excel Programming | |||
Skip ... Selection_Change Event | Excel Programming | |||
retain hyperlink target when adding/deleting rows | New Users to Excel |