Delete (.) Then Combine 3 Last Number With Mark (-)

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,077
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all...

how to modify data like this

<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC ;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC ;
}
.tableizer-table th {
background-color: #104E8B ;
color: #FFF ;
font-weight: bold;
}
</style>
dataexpected result
4.01.01.01.001.0104010101001-010
4.01.01.05.001.0074010105001-007
4.01.01.05.001.3424010105001-342

<tbody>
</tbody>


any help, thanks advance

.sst
 
Last edited:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
A formula.
Code:
=SUBSTITUTE(LEFT(A2,LEN(A2)-4),".","")&"-"&RIGHT(A2,3)

Or PowerQuery...

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
    Split = Table.SplitColumn(Source, "Data", Splitter.SplitTextByEachDelimiter({"."}, QuoteStyle.Csv, true), {"Data.1", "Data.2"}),
    Replace = Table.ReplaceValue(Split,".","",Replacer.ReplaceText,{"Data.1"}),
    Merge = Table.AddColumn(Replace, "Merged", each Text.Combine({[Data.1], Text.From([Data.2], "en-US")}, "-"), type text),
    Remove = Table.RemoveColumns(Merge,{"Data.1", "Data.2"})
in
    Remove
 
Last edited:
Upvote 0
This formula too.
Code:
=SUBSTITUTE(REPLACE(A2,LEN(A2)-3,1,"-"),".","")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,845
Messages
6,121,902
Members
449,053
Latest member
Guy Boot

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