Lil Stinker
Board Regular
- Joined
- Feb 16, 2022
- Messages
- 151
- Office Version
- 2019
- Platform
- Windows
I have three set ranges of cells on a sheet that will have numbers in them that I would like to have sorted when the macro is run.
First range is B24:O38, second range is P24:Q38 and the third is R24:S38. They sit right next to each other with no headers for which to base the sort. While the ranges are set, the numbers within those ranges are not. For instance, B24:O38 has 210 cells. Not all 210 cells will always have a value in them so the macro should be dynamic. When numbers are entered in these ranges, they are entered left to right from B24 to O24, down to the next row B25 to O25, etc. until O38 is reached.
I would simply like for the numbers to be sorted in numeric value and still display in left to right order without any spaces popping up. Some of the numbers may also start with a letter or contain a letter within.
I feel like this can be achieved through VBA but not with my limited understanding of it. Any help would be appreciated.
Below is a sample of how the form looks...
First range is B24:O38, second range is P24:Q38 and the third is R24:S38. They sit right next to each other with no headers for which to base the sort. While the ranges are set, the numbers within those ranges are not. For instance, B24:O38 has 210 cells. Not all 210 cells will always have a value in them so the macro should be dynamic. When numbers are entered in these ranges, they are entered left to right from B24 to O24, down to the next row B25 to O25, etc. until O38 is reached.
I would simply like for the numbers to be sorted in numeric value and still display in left to right order without any spaces popping up. Some of the numbers may also start with a letter or contain a letter within.
I feel like this can be achieved through VBA but not with my limited understanding of it. Any help would be appreciated.
Below is a sample of how the form looks...
2-21 mrexcelTEST.xlsm | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | |||
23 | SERIAL NUMBERS | Main | Secondary | Misc | ||||||||||||||||||
24 | 5102 | 5343 | 5138 | 8183 | 9454 | 8717 | 8916 | 8371 | 8592 | 8709 | 7793 | 8190 | 7269 | 5194 | 321 | 223 | A123 | A223 | ||||
25 | 8079 | 7328 | 5003 | 8275 | 9106 | 4836 | 7128 | 4728 | 8689 | 8897 | 8403 | 5545 | 8392 | 6812 | 524 | 657 | A405 | A324 | ||||
26 | 8067 | 101 | A100 | |||||||||||||||||||
27 | ||||||||||||||||||||||
28 | ||||||||||||||||||||||
29 | ||||||||||||||||||||||
30 | ||||||||||||||||||||||
31 | ||||||||||||||||||||||
32 | ||||||||||||||||||||||
33 | ||||||||||||||||||||||
34 | ||||||||||||||||||||||
35 | ||||||||||||||||||||||
36 | ||||||||||||||||||||||
37 | ||||||||||||||||||||||
38 | ||||||||||||||||||||||
TEST |