How do you split contents in a cell with variable characters

smerrick

Active Member
Joined
Feb 10, 2009
Messages
255
Hello,

I have a list of the following:

Account.Product Description.Product Code

(notice the dots separating each field)

is there a formula that I can use that would link to these cells and get the desired info e.g. product description or code only? Note that the number of characters do vary and currently using excel 2003.

Many Thanks
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hello,

I have a list of the following:

Account.Product Description.Product Code

(notice the dots separating each field)

is there a formula that I can use that would link to these cells and get the desired info e.g. product description or code only? Note that the number of characters do vary and currently using excel 2003.

Many Thanks


Would using Text to Columns to split the data using the "." as a delimiter be an option?
 
Upvote 0
no, looking for something like =MID(D2,1,FIND(".",D2,1)-1) but need to be able middle and right hand sections also (the above would calculate the left bit only
 
Upvote 0
The left bit:-
Code:
=TRIM(LEFT(SUBSTITUTE(A1,".",REPT(" ",99)),99))
The middle bit:-
Code:
=TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",99)),99,99))
The right bit:-
Code:
=TRIM(RIGHT(SUBSTITUTE(A1,".",REPT(" ",99)),99))
(Tested quickly here. Satisfy yourself they work with a range of inputs before relying on them.)
 
Upvote 0
May Be

=MID(A1,1,FIND(".",A1)-1)
=MID(A1,FIND(".",A1)+1,(FIND(".",A1,FIND(".",A1)+1)-FIND(".",A1)-1))
=MID(A1,FIND(".",A1,FIND(".",A1)+1)+1,99)
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,159
Members
452,892
Latest member
yadavagiri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top