View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman[_2_] Mike Fogleman[_2_] is offline
external usenet poster
 
Posts: 206
Default spread out fields in different column

In C1:
=IF(ISERR(FIND("\",B1)),B1,LEFT(B1,FIND("\",B1)-1))

In D1:
=IF(ISERR(FIND("\",B1)),B1,RIGHT(B1,LEN(B1)-FIND("\",B1)))

Mike F
"Lillian Lian" wrote in message
...
I have one excel spread sheet look like as following:
ColumnA ColumnB ColumnC ColumnD
1 gwp\test1
2 gwp\test2

I need to separate on ColumnB to ColumnC and D so it will be like this

ColumnA ColumnB ColumnC ColumnD
1 gwp\test1 gwp test1
2 gwp\test2 gwp test2

I try to use IF condition on C1 but did not work.

=IF(ISERR(FIND("\",B1)),B1,LEFT(B1,FIND("\" B1) -1

also on D1 I do like this
=Right(B1,LEN(B1),FIND("\" B1,1))

can someone help me?

Thanks

Lillian
LIllian