Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I have cell 'C25' or range CCard in which the user may enter the first 2 and lst 4 digits of a credit card or a full 16 digit card number. Apparently it seems to be the best way to avoid excels "15-digit rule" to to a macro in a worksheet change module. What i'd like to accomplish is that if the user inputs the 2/4 numbers the result is 54xx xxxx xxxx 3210 and if the user inputs the full number 16 digits it results in 5411 1111 1111 3210. I cant figure out how i can incorporate this in my existing worksheet change event which is at the end of this post. Thank you for your help. Stefan Private Sub Worksheet_Change(ByVal Target As Range) On Error Resume Next If bDisableEvents Then Exit Sub If Intersect(Target, Me.Range("C28:H28")) Is Nothing Then Exit Sub If Target = "" Then Exit Sub bDisableEvents = True With Me .Range("28:28").Insert .Range("29:29").Copy Range("28:28") .Range("28:28").ClearContents .Range("D29").Select End With bDisableEvents = False End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200507/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you change single digits to recognized double digits? | Excel Worksheet Functions | |||
VBA write macro change column with 3 number digits to 4 digits the | Excel Discussion (Misc queries) | |||
number 12 digits to 15 digits | Excel Discussion (Misc queries) | |||
How to customize number to 10 digits including 2 digits after deci | Excel Worksheet Functions | |||
last ten digits | Excel Worksheet Functions |