ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   spread out fields in different column (https://www.excelbanter.com/excel-programming/409878-spread-out-fields-different-column.html)

Lillian Lian

spread out fields in different column
 
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

Mike Fogleman[_2_]

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




Lillian Lian

spread out fields in different column
 
Mike,

It works, thank you so much.


Lillian

"Mike Fogleman" wrote:

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






All times are GMT +1. The time now is 11:45 AM.

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