Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am consolidating some rather large databases that are all indexed with a
medical record number in a specific format. The format I am using is a letter followed by 9 digits, as follows: A######### The source of the data I am attempting to incorporate is also indexed with the medical record number, but in a straight 12 digit format with the last 9 being the same. It is as follows: ############ I need to convert the second format to the first. Basically drop the first 3 digits and add the letter "N" to the front. Thanks to Tom Ogilvy, I can now compare the data bases and incorporate the matching records. But first I must convert the numbers to matching formats. Any help would be greatly appreciated, WillRn |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
WillRn
One way: Sub ConvertFormat() Dim i as range Dim MyRange as range Set MyRange = 'Define the range you want to convert For each i in MyRange i = "N" & Right(i, 9) Next i End Sub HTH Otto "WillRn" wrote in message ... I am consolidating some rather large databases that are all indexed with a medical record number in a specific format. The format I am using is a letter followed by 9 digits, as follows: A######### The source of the data I am attempting to incorporate is also indexed with the medical record number, but in a straight 12 digit format with the last 9 being the same. It is as follows: ############ I need to convert the second format to the first. Basically drop the first 3 digits and add the letter "N" to the front. Thanks to Tom Ogilvy, I can now compare the data bases and incorporate the matching records. But first I must convert the numbers to matching formats. Any help would be greatly appreciated, WillRn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing none text entry to text? | Excel Discussion (Misc queries) | |||
Use custom format to add text to a text entry. | Excel Worksheet Functions | |||
Convert Text Entry to Date Format | Excel Discussion (Misc queries) | |||
how to format a date/validate for a text box entry on a user form | Excel Programming | |||
Different text format on a listbox entry | Excel Programming |