Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Isert - ("Dash Mark")
Hello from Steved
I have over 300 each day to do . The objective is as I type 36 it will add L- to become Ll-36 and so on, yes it could be any number fropm 5 to 99 but always 2-digits. How can I acheive this please it will been in Col H:H only. Thankyou. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Isert - ("Dash Mark")
Insert this event macro in the worksheet code area:
Private Sub Worksheet_Change(ByVal Target As Range) Set t = Target Set h = Range("H:H") s = "L-" If Intersect(t, h) Is Nothing Then Exit Sub Application.EnableEvents = False t.Value = s & t.Value Application.EnableEvents = True End Sub Because it is worksheet code, it is very easy to install and automatic to use: 1. right-click the tab name near the bottom of the Excel window 2. select View Code - this brings up a VBE window 3. paste the stuff in and close the VBE window If you have any concerns, first try it on a trial worksheet. If you save the workbook, the macro will be saved with it. To remove the macro: 1. bring up the VBE windows as above 2. clear the code out 3. close the VBE window To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm To learn more about Event Macros (worksheet code), see: http://www.mvps.org/dmcritchie/excel/event.htm -- Gary''s Student - gsnu200846 "Steved" wrote: Hello from Steved I have over 300 each day to do . The objective is as I type 36 it will add L- to become Ll-36 and so on, yes it could be any number fropm 5 to 99 but always 2-digits. How can I acheive this please it will been in Col H:H only. Thankyou. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Isert - ("Dash Mark")
Could you just use a custom format of "L-"0
Gord Dibben MS Excel MVP On Mon, 13 Apr 2009 16:37:01 -0700, Steved wrote: Hello from Steved I have over 300 each day to do . The objective is as I type 36 it will add L- to become Ll-36 and so on, yes it could be any number fropm 5 to 99 but always 2-digits. How can I acheive this please it will been in Col H:H only. Thankyou. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Isert - ("Dash Mark")
Hello from Steved
I thankyou. "Gary''s Student" wrote: Insert this event macro in the worksheet code area: Private Sub Worksheet_Change(ByVal Target As Range) Set t = Target Set h = Range("H:H") s = "L-" If Intersect(t, h) Is Nothing Then Exit Sub Application.EnableEvents = False t.Value = s & t.Value Application.EnableEvents = True End Sub Because it is worksheet code, it is very easy to install and automatic to use: 1. right-click the tab name near the bottom of the Excel window 2. select View Code - this brings up a VBE window 3. paste the stuff in and close the VBE window If you have any concerns, first try it on a trial worksheet. If you save the workbook, the macro will be saved with it. To remove the macro: 1. bring up the VBE windows as above 2. clear the code out 3. close the VBE window To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm To learn more about Event Macros (worksheet code), see: http://www.mvps.org/dmcritchie/excel/event.htm -- Gary''s Student - gsnu200846 "Steved" wrote: Hello from Steved I have over 300 each day to do . The objective is as I type 36 it will add L- to become Ll-36 and so on, yes it could be any number fropm 5 to 99 but always 2-digits. How can I acheive this please it will been in Col H:H only. Thankyou. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Replace "dash" with "space" | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Parse Cell Around "Dash" in Data | Excel Programming | |||
What does the double dash or "--" do when using it in a function? (and other questions) | Excel Worksheet Functions | |||
how can I make an excel cell "mark" or "unmark" when clicked on? | Excel Discussion (Misc queries) |