Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Changing a text entry format

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default Changing a text entry format

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
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
Changing none text entry to text? Ross Excel Discussion (Misc queries) 1 July 5th 07 11:18 AM
Use custom format to add text to a text entry. Pierre Excel Worksheet Functions 4 October 30th 06 04:42 PM
Convert Text Entry to Date Format User Excel Discussion (Misc queries) 1 November 16th 05 08:40 PM
how to format a date/validate for a text box entry on a user form Tom Ogilvy Excel Programming 3 June 1st 05 05:06 PM
Different text format on a listbox entry Marcelo[_5_] Excel Programming 2 July 23rd 04 04:38 AM


All times are GMT +1. The time now is 03:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"