Sort numeric values VBA

0 votes

I have the info. can be in a list, merely in columns and rows, or really anywhere.

I've entered data such as 10, 1010, 11, 111, 2, 201, 3210, 300100, etc. with a maximum of six integers. I want the data to be sorted.

10 1010 11 111 2 201 300100 3210

And not like

2 10 11 111 201 1010 3210 300100

Any stylish approach to this I'm able to make it work with filters, so I just need some code, but I'm at a loss.

If I put a "." or another character in between each number, I can make it work with filters. After that, just add a filter and order by. not even attempted any codes.

Feb 11 in Others by narikkadan
• 59,740 points
51 views

1 answer to this question.

0 votes

Try:

enter image description here

The formula in B1:

=SORTBY(A1:A8,LEFT(A1:A8&"00000",6))
answered Feb 11 by Kithuzzz
• 34,760 points

Related Questions In Others

0 votes
1 answer
0 votes
1 answer

Converting Textboxes Link and/or Formula to Values in a Copied Sheet using Excel VBA

Copy the values using Range and Value2 With ActiveSheet.UsedRange ...READ MORE

answered Jan 31 in Others by narikkadan
• 59,740 points
88 views
0 votes
1 answer

Excel VBA compare values on multiple rows and execute additional code

I would use a Dictionary & Collection ...READ MORE

answered Feb 7 in Others by narikkadan
• 59,740 points
149 views
0 votes
1 answer

Allow alpha numeric values instead of isnumeric

Here's a small Function you could add to your ...READ MORE

answered Feb 18 in Others by narikkadan
• 59,740 points
43 views
0 votes
1 answer

Sort Excel worksheets based on name, which is a date

Sorting sheets of a workbook are rather ...READ MORE

answered Oct 17, 2022 in Others by narikkadan
• 59,740 points
152 views
0 votes
1 answer

I want to compare two Excel files and highlight the differences with VBA

The workbook doesn't have the UsedRange property ...READ MORE

answered Jan 13 in Others by narikkadan
• 59,740 points
146 views
0 votes
1 answer
0 votes
1 answer

Excel VBA function that cross references two data sets to come up with one solution

Solution using dictionary to count Public Sub citizens() ...READ MORE

answered Feb 16 in Others by narikkadan
• 59,740 points
66 views
0 votes
1 answer

VBA to protect and unprotect in given range in sheet

It needs a minor tweak to become ...READ MORE

answered Nov 24, 2022 in Others by Kithuzzz
• 34,760 points
420 views
0 votes
1 answer

How to query a matrix for multiple values and receive value

Try: =IFERROR(INDEX(SORT(SORT(FILTER(MATRIX, (LENGTHS>length)*(WEIGHTS>weight)),1,1),2,1),1,3),1) , where MATRIX, LENGTHS, and WEIGHTS ...READ MORE

answered Feb 11 in Others by Kithuzzz
• 34,760 points
85 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP