ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Splitting a text data (https://www.excelbanter.com/excel-discussion-misc-queries/259850-splitting-text-data.html)

jeya

Splitting a text data
 
I have data as " WFGHJU " in one cell. I would like to split it as WF, WG,
WH, WJ, WU

CAN ANY BODY HELP




David Biddulph[_2_]

Splitting a text data
 
=LEFT(A$1)&MID(A$1,ROW(A2),1) and copy down.
--
David Biddulph


"jeya" wrote in message
...
I have data as " WFGHJU " in one cell. I would like to split it as WF, WG,
WH, WJ, WU

CAN ANY BODY HELP





Jacob Skaria

Splitting a text data
 
With the cell text in cell A1; try the below formula in cell B1 and copy/drag
to the right
=LEFT(TRIM($A1),1) & MID(TRIM($A1),COLUMN(B1),1)

'To fine tune check for the length...
=IF(COLUMN(B1)<=LEN(TRIM($A$1)),LEFT(TRIM($A1),1) &
MID(TRIM($A1),COLUMN(B1),1),"")

--
Jacob


"jeya" wrote:

I have data as " WFGHJU " in one cell. I would like to split it as WF, WG,
WH, WJ, WU

CAN ANY BODY HELP




Chip Pearson

Splitting a text data
 
Select the cells in which the split text is to be placed, type the
following formula and press CTRL SHIFT ENTER rather than just ENTER.

=LEFT($A$1,1)&MID($A$1,COLUMN(INDIRECT("B:L")),1)

Change the $A1 to the first cell containing the original text. Change
the "B:L" to a range of columns beginning with B and ending with the
column letter corresponding to the number of elements in the original
text. This column reference has nothing to do with where the original
string reside nor with the location of this formula. It is simply a
way of getting an array of value between 2 and the length of $A1. It
should always begin with "B".

The formula is designed to be entered into a horizontal range of cells
(1 row spanning multiple columns). If you want the results to be in a
vertical range (1 column spanning several rows), use the following
instead:

=LEFT($A$1,1)&MID($A$1,ROW(INDIRECT("2:"&LEN($A$1) )),1)

This is an array formula, so you MUST press CTRL SHIFT ENTER rather
than just ENTER when you first enter the formula and whenever you edit
it later. If you do this correctly, Excel will display the formula in
the formula bar enclosed in curly braces { }. You don't type in the
braces; Excel puts them there automatically. The formula will not work
correctly if you do not enter it with CTRL SHIFT ENTER. See
www.cpearson.com/Excel/ArrayFormulas.aspx for much more information
about array formulas.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com





On Thu, 25 Mar 2010 00:26:01 -0700, jeya
wrote:

I have data as " WFGHJU " in one cell. I would like to split it as WF, WG,
WH, WJ, WU

CAN ANY BODY HELP




All times are GMT +1. The time now is 11:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com