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, 2023 in Others by narikkadan
• 63,720 points
409 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, 2023 by Kithuzzz
• 38,020 points

Related Questions In Others

0 votes
1 answer

Excel VBA search based on cell values into folders and sub-folders to get the file path and data

This will create a listing of all ...READ MORE

answered Jan 19, 2023 in Others by narikkadan
• 63,720 points
1,999 views
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, 2023 in Others by narikkadan
• 63,720 points
553 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, 2023 in Others by narikkadan
• 63,720 points
1,759 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, 2023 in Others by narikkadan
• 63,720 points
382 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
• 63,720 points
518 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, 2023 in Others by narikkadan
• 63,720 points
2,487 views
0 votes
1 answer

Creating sheets with names in column B and assigning data to each sheet for particular name

after the first occurrence of Set sht = ...READ MORE

answered Feb 13, 2023 in Others by narikkadan
• 63,720 points
764 views
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, 2023 in Others by narikkadan
• 63,720 points
737 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
• 38,020 points
2,509 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, 2023 in Others by Kithuzzz
• 38,020 points
544 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