Sorting a LOS Range

WxShady13

Board Regular
Joined
Jul 24, 2018
Messages
184
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I have the below table that is used via a VLOOKUP to pull a LOS Range into a Headcount Table. I have a chart with this data and a slicer. I cannot make the slicer sort properly. It wants to put 1 and then 10 instead of 2. What can I do to fix this problem?

YOSCategorySort
0​
0-1 Years
1​
1​
0-1 Years
1​
1.01​
1-2 Years
2​
2​
1-2 Years
2​
2.01​
2-3 Years
3​
3​
3. 2-3 Years
3​
3.01​
4. 3-4 Years
4​
4​
4. 3-4 Years
4​
4.01​
5. 4-5 Years
5​
5​
5. 4-5 Years
5​
5.01​
6. 5-6 Years
6​
6​
6. 5-6 Years
6​
6.01​
7. 6-7 Years
7​
7​
7. 6-7 Years
7​
7.01​
8. 7-8 Years
8​
8​
8. 7-8 Years
8​
8.01​
9. 8-9 Years
9​
9​
9. 8-9 Years
9​
9.01​
10. 9-10 Years
10​
10​
10. 9-10 Years
10​
10.01​
11. 10-11 Years
11​
11​
11. 10-11 Years
11​
11.01​
11. 11-12 Years
12​
12​
11. 11-12 Years
12​
12.01​
12. 12-13 Years
13​
13​
12. 12-13 Years
13​
13.01​
13. 13-14 Years
14​
14​
13. 13-14 Years
14​
14.01​
14. 14-15 Years
15​
15​
14. 14-15 Years
15​
15.01​
15. 15-16 Years
16​
16​
15. 15-16 Years
16​
16.01​
16. 16+ Years
17​
99​
16. 16+ Years
17​
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I have the below table that is used via a VLOOKUP to pull a LOS Range into a Headcount Table. I have a chart with this data and a slicer. I cannot make the slicer sort properly. It wants to put 1 and then 10 instead of 2. What can I do to fix this problem?

YOSCategorySort
0​
0-1 Years
1​
1​
0-1 Years
1​
1.01​
1-2 Years
2​
2​
1-2 Years
2​
2.01​
2-3 Years
3​
3​
3. 2-3 Years
3​
3.01​
4. 3-4 Years
4​
4​
4. 3-4 Years
4​
4.01​
5. 4-5 Years
5​
5​
5. 4-5 Years
5​
5.01​
6. 5-6 Years
6​
6​
6. 5-6 Years
6​
6.01​
7. 6-7 Years
7​
7​
7. 6-7 Years
7​
7.01​
8. 7-8 Years
8​
8​
8. 7-8 Years
8​
8.01​
9. 8-9 Years
9​
9​
9. 8-9 Years
9​
9.01​
10. 9-10 Years
10​
10​
10. 9-10 Years
10​
10.01​
11. 10-11 Years
11​
11​
11. 10-11 Years
11​
11.01​
11. 11-12 Years
12​
12​
11. 11-12 Years
12​
12.01​
12. 12-13 Years
13​
13​
12. 12-13 Years
13​
13.01​
13. 13-14 Years
14​
14​
13. 13-14 Years
14​
14.01​
14. 14-15 Years
15​
15​
14. 14-15 Years
15​
15.01​
15. 15-16 Years
16​
16​
15. 15-16 Years
16​
16.01​
16. 16+ Years
17​
99​
16. 16+ Years
17​

It sounds like you are trying to sort text. Put the VLOOKUP in a VALUE() so you are working with numbers. Then, it should sort sequentially.

For example =VALUE(VLOOKUP(A2,A13:B18,2,false))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,625
Messages
6,120,598
Members
448,973
Latest member
ksonnia

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