Remove Characters from String in Excel

p4nny

Board Regular
Joined
Jan 13, 2015
Messages
246
Hi

I would like to remove the remove characters after the final "." so the below would read 15.3.9.6

The only trouble I'm having is the final "." is in varied position.

Much appreciated

[TABLE="width: 125"]
<tbody>[TR]
[TD]15.3.9.6.9[/TD]
[/TR]
[TR]
[TD]15.3.9.6.10[/TD]
[/TR]
[TR]
[TD]15.3.9.6.11[/TD]
[/TR]
[TR]
[TD]15.3.9.6.12[/TD]
[/TR]
[TR]
[TD]15.3.9.6.13[/TD]
[/TR]
</tbody>[/TABLE]

thank you
 
Last edited:

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Book1
AB
115.3.9.6.915.3.9.6
215.3.9.6.1015.3.9.6
315.3.9.6.1115.3.9.6
415.3.9.6.1215.3.9.6
515.3.9.6.1315.3.9.6
Sheet1
Cell Formulas
RangeFormula
B1=IFERROR(LEFT($A1,FIND(CHAR(1),SUBSTITUTE($A1,".",CHAR(1),LEN($A1)-LEN(SUBSTITUTE($A1,".",""))))-1),$A1)


WBD
 
Upvote 0
If the number of characters before the last "." is the same as in your sample data, you can use:

Code:
=LEFT(A1,8)

Otherwise; you may use the below formula, which extracts the string before the 3rd occurence of "."

Code:
=LEFT(A1,FIND(".",A1,FIND(".",A1)+3)+1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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