Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default In Cell Formula to mimic text to columns.

Hello,

My data in Column A is delimited like this "AAA; BBB; CCC; DDD; EEE" - up
to a maximum of 7 items (6 delimiters)

Using a formula I want to place
"AAA" in Column B
"BBB" in Column C
"DDD" in Column E etc

The text strings are not of uniform length though, each delimited value
could be between 1 and 30 characters.

If there is no data for the n'th delimiter, then the formula should just
return ""

I can't use the Text to Columns function, as no manual input is allowed, the
sheet has to handle all of the data separation automatically, and no VBA can
be used either.

My Formula in B1 =IF(ISBLANK(A1),"",LEFT(A1,FIND("; ",A1,1)-1))
correctly returns "AAA"

In C1, I'm having a devil of a time trying to get it to know that they need
to start their TRIM or LEFT/RIGHT text removal from the second instance of ";
" and the number of characters to return until the next delimiter.

Is this possible?

Many thanks for any help.
KeLee
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default In Cell Formula to mimic text to columns.

Try this single formula ..With data in cell A1 try the below formula in B1
and copy across to H.

=TRIM(RIGHT(SUBSTITUTE(TRIM(LEFT(SUBSTITUTE(";"&$A $1&REPT(";",6),";",REPT(CHAR(32),LEN($A$1)+6),COLU MN(B1)),LEN($A$1)+6)),";",REPT(CHAR(32),LEN($A$1)) ),LEN($A$1)))

If this post helps click Yes
---------------
Jacob Skaria


"InsomniacFolder" wrote:

Hello,

My data in Column A is delimited like this "AAA; BBB; CCC; DDD; EEE" - up
to a maximum of 7 items (6 delimiters)

Using a formula I want to place
"AAA" in Column B
"BBB" in Column C
"DDD" in Column E etc

The text strings are not of uniform length though, each delimited value
could be between 1 and 30 characters.

If there is no data for the n'th delimiter, then the formula should just
return ""

I can't use the Text to Columns function, as no manual input is allowed, the
sheet has to handle all of the data separation automatically, and no VBA can
be used either.

My Formula in B1 =IF(ISBLANK(A1),"",LEFT(A1,FIND("; ",A1,1)-1))
correctly returns "AAA"

In C1, I'm having a devil of a time trying to get it to know that they need
to start their TRIM or LEFT/RIGHT text removal from the second instance of ";
" and the number of characters to return until the next delimiter.

Is this possible?

Many thanks for any help.
KeLee

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default In Cell Formula to mimic text to columns.

This worked perfectly.
I've used the single formula version from Jacob Skaria.
Thank you both for a speedy and perfect reply.

Regards,
KeLee

"InsomniacFolder" wrote:

Hello,

My data in Column A is delimited like this "AAA; BBB; CCC; DDD; EEE" - up
to a maximum of 7 items (6 delimiters)

Using a formula I want to place
"AAA" in Column B
"BBB" in Column C
"DDD" in Column E etc

The text strings are not of uniform length though, each delimited value
could be between 1 and 30 characters.

If there is no data for the n'th delimiter, then the formula should just
return ""

I can't use the Text to Columns function, as no manual input is allowed, the
sheet has to handle all of the data separation automatically, and no VBA can
be used either.

My Formula in B1 =IF(ISBLANK(A1),"",LEFT(A1,FIND("; ",A1,1)-1))
correctly returns "AAA"

In C1, I'm having a devil of a time trying to get it to know that they need
to start their TRIM or LEFT/RIGHT text removal from the second instance of ";
" and the number of characters to return until the next delimiter.

Is this possible?

Many thanks for any help.
KeLee

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
Mimic a watermark BusAdmAsst Excel Discussion (Misc queries) 2 April 11th 07 12:16 AM
Custom Cell format to mimic time format [email protected] Excel Discussion (Misc queries) 6 November 7th 06 09:17 PM
Formula(ae) to mimic offsetinmg of losses against profits Bill Excel Worksheet Functions 0 March 26th 05 10:46 PM
Formula(ae) to mimic offsetinmg of losses against profits Bill Excel Worksheet Functions 1 March 21st 05 08:20 AM
Excel template to mimic PowerPoint Julian Excel Discussion (Misc queries) 0 February 3rd 05 02:01 PM


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