Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All, I have VBA code which adds 99 before 10 digits and differs if the digits chnage its perfectly workin but if i copy paste the data say from C1:C10 into A1 its showing an run time error13.Here's my code: Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A:A")) Is Nothing Then If Len(Target.Value) < 12 And Target.Value = 0 Then Target.Value = Left("990000000000", 12 - Len(Target.Value)) & Target.Value End If End If End Sub Any help would be appreciated. Thanks & Regards, Raja -- Raja ------------------------------------------------------------------------ Raja's Profile: http://www.thecodecage.com/forumz/member.php?userid=497 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=115104 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Possible Array Solution Needed? | Excel Discussion (Misc queries) | |||
Lookup solution needed | Excel Programming | |||
Function or VBA Solution Needed | Excel Programming | |||
Function or VBA Solution Needed | Excel Programming | |||
Solution Needed, please help! | Excel Programming |