split cells

P

prav

hi there i would like to split a cell for example 0.0456452 +j 0.823692
to 0.0456452 and 0.82362, however they are different size. I was trying
to use a delimeter but it was not working as i wanted. Basically, how i
formulate this split. thank you
 
C

Carl

Use the Find() function to locate the "+j" and use the result in the
Left() and Right() functions to parse out the data.
 
B

Bob Phillips

I take it the j is a typo.

Use Data>Text To Columns, with a delimiter of +


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
P

prav

Carl could you please give me an example how i can implement you
solution as i'm bit lost. Thank yo
 
D

Daminc

Wouldn't it be better to find/replace '+j' with '+' before implimenting

-"Use Data>Text To Columns, with a delimiter of +"-
 
P

Puppet_Sock

[top posting fixed]
Bob said:
"prav"wrote

I take it the j is a typo.

Probably not. Likely the original data is complex numbers.
The letter j is not rare for this purpose.
Use Data>Text To Columns, with a delimiter of +

If it is complex numbers, then the original data likely contains
+ and -, for both the portions. There may be other annoyances
with the input data.

All of that means it probably is not a single step to get your
data into Excel.

To make the Text To Columns thing work, it may be necessary
to do a small amount of pre-processing to get the data in the
format you need. For example, you could substitute all the
+ signs with " +" that is, make sure there is at least one
space before every + sign. Also do the same with
every - sign, and every j. Then go back and kill any spaces
after the signs. Then you can use space as a delimeter to
parse your data.

There may be plenty of other complications if your data
really is complex floating data. For example, some of
the numbers might have E notation, as for example:

0.7848E-5 +j 0.3584E+3

Now your pre-processing has to get more complicated again,
so that when you do the text to columns you don't wind up
with the extra sign making a new column. Hopefully this is
straightforward.
Socks
 
Top