Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default Import underscore in coding every after 2 digits

Dear All

I have a fixed coding with 8 digits. (ie: 40000000).
I need to change this and split it importing underscore every two digits in
order to look like (ie.: 40_00_00_00)
Any clever way to do it for 25000 rows?

Thanks in advance for your time.... :)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Import underscore in coding every after 2 digits

--To retain these as numbers; select the range and from menu
FormatCellsCustom and type as below

00"_"00"_"00"_"00

--OR as text; you can use a formula in ColB to convert
=LEFT(A1,2)&"_" & MID(A1,3,2)&"_"&MID(A1,5,2)&"_"&RIGHT(A1,2)

If you are trying to import this to elsewhere using code you can try the
format function as below

Format(range("A1"),"00_00_00_00")

--
Jacob (MVP - Excel)


"Manos" wrote:

Dear All

I have a fixed coding with 8 digits. (ie: 40000000).
I need to change this and split it importing underscore every two digits in
order to look like (ie.: 40_00_00_00)
Any clever way to do it for 25000 rows?

Thanks in advance for your time.... :)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 464
Default Import underscore in coding every after 2 digits

=LEFT(A1,2) & "_" & MID(A1,2,2) & "_" & MID(A1,6,2) & "_" & RIGHT(A1,2)



--
Regards
Dave Hawley
www.ozgrid.com
"Manos" wrote in message
...
Dear All

I have a fixed coding with 8 digits. (ie: 40000000).
I need to change this and split it importing underscore every two digits
in
order to look like (ie.: 40_00_00_00)
Any clever way to do it for 25000 rows?

Thanks in advance for your time.... :)


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Import underscore in coding every after 2 digits

=SUBSTITUTE(TEXT(A1,"00-00-00-00"),"-","_")


"Manos" wrote:

Dear All

I have a fixed coding with 8 digits. (ie: 40000000).
I need to change this and split it importing underscore every two digits in
order to look like (ie.: 40_00_00_00)
Any clever way to do it for 25000 rows?

Thanks in advance for your time.... :)

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Import underscore in coding every after 2 digits

Or just:
=TEXT(A1,"00\_00\_00\_00")

The backslash is the escape character to indicate that the next character should
be treated as text--not a formatting character.

Teethless mama wrote:

=SUBSTITUTE(TEXT(A1,"00-00-00-00"),"-","_")

"Manos" wrote:

Dear All

I have a fixed coding with 8 digits. (ie: 40000000).
I need to change this and split it importing underscore every two digits in
order to look like (ie.: 40_00_00_00)
Any clever way to do it for 25000 rows?

Thanks in advance for your time.... :)


--

Dave Peterson
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
underscore in functions westronwynde Excel Worksheet Functions 4 May 6th 23 11:45 AM
underscore in email address covered by hyperlink underscore Chuck Bowser Excel Discussion (Misc queries) 1 April 22nd 09 05:47 PM
'underscore' line in '__ / __' not printing ??? akm Excel Discussion (Misc queries) 2 December 11th 07 09:36 PM
How can I double underscore in excel? KennyG Excel Worksheet Functions 2 December 20th 06 08:46 PM
how can i make a measurment with and underscore under the second diane Excel Discussion (Misc queries) 4 April 1st 06 07:25 AM


All times are GMT +1. The time now is 06:58 AM.

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"