ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Splitting cell contents into 2 cells (https://www.excelbanter.com/excel-discussion-misc-queries/263920-splitting-cell-contents-into-2-cells.html)

Florence Tay

Splitting cell contents into 2 cells
 
If a cell contains a set of numbers separated by a hyphen (eg, 1234-5678, can
the contents be splitted up into 2 cells without the hyphen (ie, 1234 in 1
cell and 5678 in another cell)?

Luke M[_4_]

Splitting cell contents into 2 cells
 
You can either do the simple:
Data - Text to columns, delimited by hypen

Or, you could try and do:
=VALUE(LEFT(A2,FIND("-",A2)-1))
in one cells and
=VALUE(MID(A2,FIND("-",A2)+1,999))
in the other.

--
Best Regards,

Luke M
"Florence Tay" <Florence wrote in message
...
If a cell contains a set of numbers separated by a hyphen (eg, 1234-5678,
can
the contents be splitted up into 2 cells without the hyphen (ie, 1234 in 1
cell and 5678 in another cell)?





All times are GMT +1. The time now is 01:17 PM.

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