Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 361
Default Formating Question

Raw Formated
HPQEI HPQ EI
HPQBV HPQ BV
DDMX DD MX
EMCPE EMC PE


I am trying to convert (reformat) ColA to ColB. The right 2 characters need
to be separated from the other characters by a space AND the left characters
need to have a length of 3. For example, for row 3 (DDMX), I need the
formated value to be DD__MX.

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Formating Question

On Fri, 16 Nov 2007 08:16:07 -0800, carl
wrote:

Raw Formated
HPQEI HPQ EI
HPQBV HPQ BV
DDMX DD MX
EMCPE EMC PE


I am trying to convert (reformat) ColA to ColB. The right 2 characters need
to be separated from the other characters by a space AND the left characters
need to have a length of 3. For example, for row 3 (DDMX), I need the
formated value to be DD__MX.

Thank you in advance.


=LEFT(A1,LEN(A1)-2) & " " & RIGHT(A1,2)
--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Formating Question

hi
not sure if you can do this with a format but this might work for you
=IF(LEN(A12)4,LEFT(A12,3) & " " &RIGHT(A12,2),LEFT(A12,2)&"_ "&RIGHT(A12,2))
that wrapped. it's all one line. i was confused by what you ment by...
DD__MX so i put a space and an underscore. replace it with what you need.
Adjust ranges to fit your data. copy down. copy formulas and paste a values.

Regards
FSt1
"carl" wrote:

Raw Formated
HPQEI HPQ EI
HPQBV HPQ BV
DDMX DD MX
EMCPE EMC PE


I am trying to convert (reformat) ColA to ColB. The right 2 characters need
to be separated from the other characters by a space AND the left characters
need to have a length of 3. For example, for row 3 (DDMX), I need the
formated value to be DD__MX.

Thank you in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 364
Default Formating Question

"carl" wrote in message
...
Raw Formated
HPQEI HPQ EI
HPQBV HPQ BV
DDMX DD MX
EMCPE EMC PE


I am trying to convert (reformat) ColA to ColB. The right 2 characters
need
to be separated from the other characters by a space AND the left
characters
need to have a length of 3. For example, for row 3 (DDMX), I need the
formated value to be DD__MX.

Thank you in advance.


Try this:
=IF(LEN(A1)=5,LEFT(A1,3),LEFT(A1,2)&" ")&" "&RIGHT(A1,2)


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default Formating Question

Hi,

Assuming that you have text with length of 5 and 4, please find the
following formula.

=IF(LEN(A1)=5,CONCATENATE(LEFT(A1,3),"
",RIGHT(A1,2)),CONCATENATE(LEFT(A1,2)," ",RIGHT(A1,2)))

Regards,
Soundar.

"FSt1" wrote:

hi
not sure if you can do this with a format but this might work for you
=IF(LEN(A12)4,LEFT(A12,3) & " " &RIGHT(A12,2),LEFT(A12,2)&"_ "&RIGHT(A12,2))
that wrapped. it's all one line. i was confused by what you ment by...
DD__MX so i put a space and an underscore. replace it with what you need.
Adjust ranges to fit your data. copy down. copy formulas and paste a values.

Regards
FSt1
"carl" wrote:

Raw Formated
HPQEI HPQ EI
HPQBV HPQ BV
DDMX DD MX
EMCPE EMC PE


I am trying to convert (reformat) ColA to ColB. The right 2 characters need
to be separated from the other characters by a space AND the left characters
need to have a length of 3. For example, for row 3 (DDMX), I need the
formated value to be DD__MX.

Thank you in advance.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Formating Question

I think this will work for you:
=LEFT(A3,2) & " " & RIGHT(A3,2)


--
RyGuy


"Stephen" wrote:

"carl" wrote in message
...
Raw Formated
HPQEI HPQ EI
HPQBV HPQ BV
DDMX DD MX
EMCPE EMC PE


I am trying to convert (reformat) ColA to ColB. The right 2 characters
need
to be separated from the other characters by a space AND the left
characters
need to have a length of 3. For example, for row 3 (DDMX), I need the
formated value to be DD__MX.

Thank you in advance.


Try this:
=IF(LEN(A1)=5,LEFT(A1,3),LEFT(A1,2)&" ")&" "&RIGHT(A1,2)



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Formating Question

On Fri, 16 Nov 2007 11:35:32 -0500, Ron Rosenfeld
wrote:

On Fri, 16 Nov 2007 08:16:07 -0800, carl
wrote:

Raw Formated
HPQEI HPQ EI
HPQBV HPQ BV
DDMX DD MX
EMCPE EMC PE


I am trying to convert (reformat) ColA to ColB. The right 2 characters need
to be separated from the other characters by a space AND the left characters
need to have a length of 3. For example, for row 3 (DDMX), I need the
formated value to be DD__MX.

Thank you in advance.


=LEFT(A1,LEN(A1)-2) & " " & RIGHT(A1,2)
--ron


I misread. Try this instead:

=LEFT(A1,MIN(3,LEN(A1)-2)) & REPT( " ",6-LEN(A1))& " " & RIGHT(A1,2)

Of course, unless you use a fixed-space font, the text will not "line up".
--ron
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Formating Question

On Fri, 16 Nov 2007 11:35:32 -0500, Ron Rosenfeld
wrote:

On Fri, 16 Nov 2007 08:16:07 -0800, carl
wrote:

Raw Formated
HPQEI HPQ EI
HPQBV HPQ BV
DDMX DD MX
EMCPE EMC PE


I am trying to convert (reformat) ColA to ColB. The right 2 characters need
to be separated from the other characters by a space AND the left characters
need to have a length of 3. For example, for row 3 (DDMX), I need the
formated value to be DD__MX.

Thank you in advance.


=LEFT(A1,LEN(A1)-2) & " " & RIGHT(A1,2)
--ron


That correction should have been:

=LEFT(A1,MIN(3,LEN(A1)-2)) & REPT( " ",6-MIN(5,LEN(A1)))& " " & RIGHT(A1,2)


--ron
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
Conditional Formating Question carl Excel Worksheet Functions 4 March 10th 07 11:30 AM
Worksheet formating question Stacy O Excel Discussion (Misc queries) 2 August 16th 06 10:05 PM
Formating question toot033 Excel Discussion (Misc queries) 2 August 9th 06 06:35 PM
Formating Question Please Bob Newman Excel Discussion (Misc queries) 2 February 13th 06 02:33 PM
Conditional Formating Question terri Excel Discussion (Misc queries) 3 November 27th 05 02:01 AM


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