I have spreadsheets with columns of domain names in columns.
I want to add columns to split
exampledomain.com
anotherdomain.net
yetanotherdomain.website
etc
into
exampledomain.com exampledomain com
anotherdomain.net anotherdomain net
yetanothername.website yetanothername website
etc.
I realise this can be done use copying and Text to Columns, but I need to be able to do this in a formula each time I add a new domain into the LH column.
There is no predictable length of either part before or after the . of course.
Formula to do this?
Thanks!
[Solved] Split cell value into 2 parts separated by a .
[Solved] Split cell value into 2 parts separated by a .
Last edited by Max1001 on Mon Aug 20, 2018 3:26 pm, edited 1 time in total.
Open Office 4.1.3 on Windows 10
Re: Formula to split cell value into 2 parts separated by a
If there is only one ., this will extract the text before the .
and this will extract the text after the .
Code: Select all
=LEFT(A1;FIND(".";A1) -1 )
Code: Select all
=RIGHT(A1;LEN(A1) - FIND(".";A1))
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Formula to split cell value into 2 parts separated by a
Thanks very much. This worked a treat.
I should have said I needed to retain the . in the 2nd column, which I accomplished using Concatenate as follows:
=(CONCATENATE("."; RIGHT( $A1;LEN($A1)-FIND("."; $A1))))
I should have said I needed to retain the . in the 2nd column, which I accomplished using Concatenate as follows:
=(CONCATENATE("."; RIGHT( $A1;LEN($A1)-FIND("."; $A1))))
Open Office 4.1.3 on Windows 10
-
- Posts: 68
- Joined: Wed Apr 19, 2017 9:22 pm
Re: [SOLVED] split cell value into 2 parts separated by a .
Or you could have used the "&" operator, or just adjusted the formula as follows to include that extra dot character.I should have said I needed to retain the . in the 2nd column, which I accomplished using Concatenate as follows:
=(CONCATENATE("."; RIGHT( $A1;LEN($A1)-FIND("."; $A1))))
RIGHT ( $A1; LEN($A1) - FIND("."; $A1) + 1 )
or
RIGHT ( $A1; LEN($A1) - (FIND("."; $A1) - 1) )
Always good to have backup methods
OpenOffice 4.1.1 on Windows 7