Formula to change the decimal numbers

NewbieAU

New Member
Joined
Oct 25, 2021
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
Hi everyone. I have a question to ask if it's possible.

I have a set of numbers with decimal points. I have to sort them in ascending order, then remove the "gaps" in the decimal points.

OriginalSorted in ascending orderModified
1.13​
1.01​
1.01​
1.02​
1.02​
1.02​
1.04​
1.04​
1.03​
1.01​
1.13​
1.04​
2.13​
2.01​
2.01​
2.02​
2.02​
2.02​
2.04​
2.04​
2.03​
2.01​
2.13​
2.04​

For example, in the sorted section, we have a "gap" between 1.02 and 1.04. I need to change the 1.04 to 1.03 so there is no skipping. Similarly, 1.13 then becomes 1.04.

The "main numbers" (ones and tens etc) cannot be changed - only the decimal section. How can I go about doing this?

Thanks in advance.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I just realized the above example wasn't great in that in both instances, we have .04 and .13 that becomes .03 and .04 respectively. This may not always be the case :(
 
Upvote 0
This is absolutely perfect! Thank you for understanding exactly what I was trying to do. I got so confused towards the end while manually changing the numbers. I really appreciate this!

Thank you again!
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,638
Members
449,093
Latest member
Ahmad123098

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