Question about splitting cell/column

khyber

New Member
Joined
Jul 26, 2013
Messages
5
I have a column in my spreadsheet called Model#. The format of these model numbers look like this:

T Bold 5000.FX.B

The dots are basically separators. I would like to copy over these model numbers to another column but remove the last dot and whatever that comes after it. For example:

T Bold 5000.FX.B --> T Bold 5000.FX
Bold 2500.GB..B --> Bold 2500.GB.
TM 25.BO.A1.T --> TM 25.BO.A1

How can I do this using a function? There are a lot of model numbers and doing it manually is very hard.
I have been looking at the RIGHT+SEARCH function but couldn't really find a solution.
Thanks in advance.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I have a column in my spreadsheet called Model#. The format of these model numbers look like this:

T Bold 5000.FX.B

The dots are basically separators. I would like to copy over these model numbers to another column but remove the last dot and whatever that comes after it. For example:

T Bold 5000.FX.B --> T Bold 5000.FX
Bold 2500.GB..B --> Bold 2500.GB.
TM 25.BO.A1.T --> TM 25.BO.A1

How can I do this using a function? There are a lot of model numbers and doing it manually is very hard.
I have been looking at the RIGHT+SEARCH function but couldn't really find a solution.
Thanks in advance.

If the model numbers you are modifying always only have one letter following that last dot (as your examples all show), then you can use this formula...

=LEFT(A1,LEN(A1)-2)
 
Upvote 0
If the model numbers you are modifying always only have one letter following that last dot (as your examples all show), then you can use this formula...

=LEFT(A1,LEN(A1)-2)

Some don't even have a letter following the dot.

HansV from MS Community showed me this function:

=LEFT(D2,FIND("@",SUBSTITUTE(D2,".","@",LEN(D2)-LEN(SUBSTITUTE(D2,".",""))))-1)



It works perfectly but I am having hard time understanding how it works. Maybe you can explain better?

Thanks for the help though.
 
Upvote 0
Some don't even have a letter following the dot.

HansV from MS Community showed me this function:

=LEFT(D2,FIND("@",SUBSTITUTE(D2,".","@",LEN(D2)-LEN(SUBSTITUTE(D2,".",""))))-1)

It works perfectly but I am having hard time understanding how it works. Maybe you can explain better?

Thanks for the help though.
About the two lines I highlighted in red... please read Rule #10 from this forum's rules here...

http://www.mrexcel.com/forum/board-announcements/99490-forum-rules.html

and in particular click the link at the end of Message #10 to find out why what you did was a bad thing!
 
Upvote 0
Maybe this:

Code:
=IFERROR(REPLACE(A1,LOOKUP(9^9,FIND(".",A1,ROW($1:$999))),999,""),A1)

Markmzz
 
Upvote 0
My mistake. For some reason I cannot edit my post to add the link to the original post.
You only get about 10 minutes to be able to edit a message you post to this forum. Once that time has passed, the best you can do is to post a response to your original message and indicate your question was asked elsewhere and provide the link to it. Of course, for future message you post here, it would be best to provide the link in your original message. Oh, by the way, to be fair to those in the MS Community, you should post a message there indicating you asked your question in another forum and post a link there to your thread here in this forum.
 
Upvote 0
Maybe this:

Code:
=IFERROR(REPLACE(A1,LOOKUP(9^9,FIND(".",A1,ROW($1:$999))),999,""),A1)

Markmzz

Hi Khyber!

Did you try my formula?

Here is the results of my formula:

Data
Result
T Bold 5000.FX.B
T Bold 5000.FX
Bold 2500.GB..B
Bold 2500.GB.
TM 25.BO.A1.T
TM 25.BO.A1
TM 25.BO.A1.T tetetetete
TM 25.BO.A1
TM 25.BO.A1.T werr
TM 25.BO.A1
TM 25.BO.A1ncnncncnc.T
TM 25.BO.A1ncnncncnc
TM 25.BO.A1.T
TM 25.BO.A1
TM 25.tetetteBO.A1.T
TM 25.tetetteBO.A1
TM 25
TM 25
**********************
********************

<tbody>
</tbody>

Markmzz
 
Upvote 0
I have a column in my spreadsheet called Model#. The format of these model numbers look like this:

T Bold 5000.FX.B

The dots are basically separators. I would like to copy over these model numbers to another column but remove the last dot and whatever that comes after it. For example:

T Bold 5000.FX.B --> T Bold 5000.FX
Bold 2500.GB..B --> Bold 2500.GB.
TM 25.BO.A1.T --> TM 25.BO.A1

How can I do this using a function? There are a lot of model numbers and doing it manually is very hard.
I have been looking at the RIGHT+SEARCH function but couldn't really find a solution.
Thanks in advance.

FYI: This question was also asked at MS Community:
Split a cells/column - Microsoft Community
 
Upvote 0
Hi Khyber!

Did you try my formula?

Here is the results of my formula:

DataResult
T Bold 5000.FX.B T Bold 5000.FX
Bold 2500.GB..B Bold 2500.GB.
TM 25.BO.A1.T TM 25.BO.A1
TM 25.BO.A1.T teteteteteTM 25.BO.A1
TM 25.BO.A1.T werrTM 25.BO.A1
TM 25.BO.A1ncnncncnc.T TM 25.BO.A1ncnncncnc
TM 25.BO.A1.T TM 25.BO.A1
TM 25.tetetteBO.A1.T TM 25.tetetteBO.A1
TM 25TM 25
******************************************

<tbody>
</tbody>

Markmzz

Yes, this worked too. Thank you everyone for the help.
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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