Decimal Points and sorting from smallest to largest

Liverlee

New Member
Joined
Nov 8, 2018
Messages
44
Hello.

I'm in need of assistance again. I want to sort the decimals in my spreadsheet from smallest to largest.

In cell b2 i have the formula = ifs(A2="Apple","1.",A2="Orange","2.",A2="Kiwi","3.",A2="Pear","4." This gives me the first part of the decimal.
In cell c2 i have the formula = countifs($a$2:a2,a2) gives me a sequence of numbers to go after the decimal.
In cell d2 i concat b2&c2 to bring them together so it shows a column of decimal numbers i.e 1.1, 1.2, 1.3, 2.1,2.50,1.5,3.7,4.8 etc etc

Except they are not numbers so I can't filter and sort from smallest to biggest. I get the sort a-z option.

Is there a simple formula that I can use to change the text into a number or a simple formula to sort my end results out from smallest to largest?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,713
Office Version
  1. 365
Platform
  1. Windows
How about
Excel Formula:
=IFS(A2="Apple",1,A2="Orange",2,A2="Kiwi",3,A2="Pear",4)+COUNTIFS(A$2:A2,A2)/10
 

Liverlee

New Member
Joined
Nov 8, 2018
Messages
44
Ohhh my, you've sorted me out again in the blink of an eye ? thankyou so much.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,713
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Forum statistics

Threads
1,176,119
Messages
5,901,483
Members
434,896
Latest member
Derquila

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
Top