Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 14
Default Formatting cells with numbers and text

I have a column of numbers with text; i.e., 23L252350, 06K100997, 50J304888,
etc. These numbers and text need to have a hyphen inserted after the first
two numbers/characters and the next four numbers/characters, i.e.,
23-L252-350, 06-K100-997, 50-J304-888. I tried using
Format-Cells-Number-Custom, but cannot seem to get it to work since the 3rd
character is usually (but not always) text.

Any assistance would be greatly appreciated. Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,276
Default Formatting cells with numbers and text

Hi,
try

=LEFT(B7,2)&"-"&MID(B7,3,4)&"-"&RIGHT(B7,3)

change the cell # to fit your needs

"Dazed and Confused" wrote:

I have a column of numbers with text; i.e., 23L252350, 06K100997, 50J304888,
etc. These numbers and text need to have a hyphen inserted after the first
two numbers/characters and the next four numbers/characters, i.e.,
23-L252-350, 06-K100-997, 50-J304-888. I tried using
Format-Cells-Number-Custom, but cannot seem to get it to work since the 3rd
character is usually (but not always) text.

Any assistance would be greatly appreciated. Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,276
Default Formatting cells with numbers and text

Sorry, add the formula in a column beside where you have the information

"Eduardo" wrote:

Hi,
try

=LEFT(B7,2)&"-"&MID(B7,3,4)&"-"&RIGHT(B7,3)

change the cell # to fit your needs

"Dazed and Confused" wrote:

I have a column of numbers with text; i.e., 23L252350, 06K100997, 50J304888,
etc. These numbers and text need to have a hyphen inserted after the first
two numbers/characters and the next four numbers/characters, i.e.,
23-L252-350, 06-K100-997, 50-J304-888. I tried using
Format-Cells-Number-Custom, but cannot seem to get it to work since the 3rd
character is usually (but not always) text.

Any assistance would be greatly appreciated. Thank you.

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
Formatting cells for text and numbers CMEknit Excel Worksheet Functions 2 February 12th 09 06:21 PM
Formatting cells for text and numbers Preston Excel Worksheet Functions 2 February 12th 09 05:48 PM
Formula Text String: Formatting Text and Numbers? dj479794 Excel Discussion (Misc queries) 5 June 30th 07 12:19 AM
formatting cells with numbers as text TimR Excel Discussion (Misc queries) 2 March 14th 07 11:12 PM
numbers to text with formatting Mike Excel Discussion (Misc queries) 1 March 29th 06 03:50 PM


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