Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default 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
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
Replace "dash" with "space" Turkey Excel Discussion (Misc queries) 2 April 30th 09 11:31 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Parse Cell Around "Dash" in Data [email protected] Excel Programming 3 December 11th 06 04:31 PM
What does the double dash or "--" do when using it in a function? (and other questions) CanoAko Excel Worksheet Functions 5 August 9th 06 07:21 PM
how can I make an excel cell "mark" or "unmark" when clicked on? Rick Excel Discussion (Misc queries) 6 January 8th 06 10:15 PM


All times are GMT +1. The time now is 05:30 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"