• 464K Members
• 5,170 Online
• 561K Conversations

## Sorting on Last 2 Digits of Number

Occasional Visitor

# Sorting on Last 2 Digits of Number

Is there a way to sort data on the last 2 digits of a 8 digit number?

2 Replies
Highlighted

# Re: Sorting on Last 2 Digits of Number

If your 8-digit numbers are in A2:A10, the formula in B2, copied down rows, to sort the numbers based on their last 2 digits is:

=LOOKUP(PI(),
1/(--RIGHT(A\$2:A\$10,2)=AGGREGATE(15,4,--RIGHT(A\$2:A\$10,2),ROW()-1)),
A\$2:A\$10)

See the sample in the attached file.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies