VBA Excel sort groups of cells / rowsHow do I sort a list of dictionaries by a value of the dictionary?Sort a Map<Key, Value> by valuesHow do I create an Excel (.XLS and .XLSX) file in C# without installing Microsoft Office?How do I sort a dictionary by value?How do I sort an NSMutableArray with custom objects in it?Sorting an array of JavaScript objects by propertySort array of objects by string property valueHow to sort a dataframe by multiple column(s)Sort ArrayList of custom Objects by propertyHow to avoid using Select in Excel VBA

"Practice makes perfect" and "c'est en forgeant qu'on devient forgeron"

D Scale Question

Why do we need explainable AI?

Can my UK debt be collected because I have to return to US?

Could a simple hospital oxygen mask protect from aerosol poison?

Can a human variant take proficiency in initiative?

Given a specific computer system, is it possible to estimate the actual precise run time of a piece of Assembly code

Should we run PBKDF2 for every plaintext to be protected or should we run PBKDF2 only once?

If the government illegally doesn't ask for article 50 extension, can parliament do it instead?

Why didn't Thatcher give Hong Kong to Taiwan?

Received email from ISP saying one of my devices has malware

Single vs Multiple Try Catch

How to have the "Restore Missing Files" function from Nautilus without installing Nautilus?

Different past tense for various *et words

Quick Slitherlink Puzzles: KPK and 123

Could these polynomials be identified?

Polarity of gas discharge tubes?

How were US credit cards verified in-store in the 1980's?

Using font to highlight a god's speech in dialogue

Displaying Time in HH:MM Format

Datasets of Large Molecules

How can an F-22 Raptor reach supersonic speeds without having supersonic inlets?

What is the definition of Product

Turn off Google Chrome's Notification for "Flash Player will no longer be supported after December 2020."



VBA Excel sort groups of cells / rows


How do I sort a list of dictionaries by a value of the dictionary?Sort a Map<Key, Value> by valuesHow do I create an Excel (.XLS and .XLSX) file in C# without installing Microsoft Office?How do I sort a dictionary by value?How do I sort an NSMutableArray with custom objects in it?Sorting an array of JavaScript objects by propertySort array of objects by string property valueHow to sort a dataframe by multiple column(s)Sort ArrayList of custom Objects by propertyHow to avoid using Select in Excel VBA






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have data grouped into sets of three rows and two columns (assigned as named ranges) which I'd like to sort according to a number in one of the cells. This is my data:



 A | B
----------------------
1 | 15 16
2 | green
3 | car

4 | 11 12
5 | blue
6 | boat

7 | 20 21
8 | pink
9 | bike

10 | 7 8
11 | red
12 | bus


The numbers are start and end times so I need to sort by the first number in each group of cells (A1, A4, A7, A10 in my example). The result should be this:



 A | B
----------------------
1 | 7 8
2 | red
3 | bus

4 | 11 12
5 | blue
6 | boat

7 | 15 16
8 | green
9 | car

10 | 20 21
11 | pink
12 | bike


I'm really not sure what the best way of doing this would be so any help greatly appreciated.










share|improve this question


























  • In brief, I would suggest you collect your data groups into a dictionary, with the "key" being your "sorting key" (start time, I assume). Then you can sort the keys without losing the data, and output the results in the sorted order.

    – Ron Rosenfeld
    Mar 28 at 1:29

















0















I have data grouped into sets of three rows and two columns (assigned as named ranges) which I'd like to sort according to a number in one of the cells. This is my data:



 A | B
----------------------
1 | 15 16
2 | green
3 | car

4 | 11 12
5 | blue
6 | boat

7 | 20 21
8 | pink
9 | bike

10 | 7 8
11 | red
12 | bus


The numbers are start and end times so I need to sort by the first number in each group of cells (A1, A4, A7, A10 in my example). The result should be this:



 A | B
----------------------
1 | 7 8
2 | red
3 | bus

4 | 11 12
5 | blue
6 | boat

7 | 15 16
8 | green
9 | car

10 | 20 21
11 | pink
12 | bike


I'm really not sure what the best way of doing this would be so any help greatly appreciated.










share|improve this question


























  • In brief, I would suggest you collect your data groups into a dictionary, with the "key" being your "sorting key" (start time, I assume). Then you can sort the keys without losing the data, and output the results in the sorted order.

    – Ron Rosenfeld
    Mar 28 at 1:29













0












0








0








I have data grouped into sets of three rows and two columns (assigned as named ranges) which I'd like to sort according to a number in one of the cells. This is my data:



 A | B
----------------------
1 | 15 16
2 | green
3 | car

4 | 11 12
5 | blue
6 | boat

7 | 20 21
8 | pink
9 | bike

10 | 7 8
11 | red
12 | bus


The numbers are start and end times so I need to sort by the first number in each group of cells (A1, A4, A7, A10 in my example). The result should be this:



 A | B
----------------------
1 | 7 8
2 | red
3 | bus

4 | 11 12
5 | blue
6 | boat

7 | 15 16
8 | green
9 | car

10 | 20 21
11 | pink
12 | bike


I'm really not sure what the best way of doing this would be so any help greatly appreciated.










share|improve this question
















I have data grouped into sets of three rows and two columns (assigned as named ranges) which I'd like to sort according to a number in one of the cells. This is my data:



 A | B
----------------------
1 | 15 16
2 | green
3 | car

4 | 11 12
5 | blue
6 | boat

7 | 20 21
8 | pink
9 | bike

10 | 7 8
11 | red
12 | bus


The numbers are start and end times so I need to sort by the first number in each group of cells (A1, A4, A7, A10 in my example). The result should be this:



 A | B
----------------------
1 | 7 8
2 | red
3 | bus

4 | 11 12
5 | blue
6 | boat

7 | 15 16
8 | green
9 | car

10 | 20 21
11 | pink
12 | bike


I'm really not sure what the best way of doing this would be so any help greatly appreciated.







excel vba sorting






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 7:29









Pᴇʜ

31.5k6 gold badges30 silver badges56 bronze badges




31.5k6 gold badges30 silver badges56 bronze badges










asked Mar 28 at 0:54









jock444jock444

31 bronze badge




31 bronze badge















  • In brief, I would suggest you collect your data groups into a dictionary, with the "key" being your "sorting key" (start time, I assume). Then you can sort the keys without losing the data, and output the results in the sorted order.

    – Ron Rosenfeld
    Mar 28 at 1:29

















  • In brief, I would suggest you collect your data groups into a dictionary, with the "key" being your "sorting key" (start time, I assume). Then you can sort the keys without losing the data, and output the results in the sorted order.

    – Ron Rosenfeld
    Mar 28 at 1:29
















In brief, I would suggest you collect your data groups into a dictionary, with the "key" being your "sorting key" (start time, I assume). Then you can sort the keys without losing the data, and output the results in the sorted order.

– Ron Rosenfeld
Mar 28 at 1:29





In brief, I would suggest you collect your data groups into a dictionary, with the "key" being your "sorting key" (start time, I assume). Then you can sort the keys without losing the data, and output the results in the sorted order.

– Ron Rosenfeld
Mar 28 at 1:29












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388624%2fvba-excel-sort-groups-of-cells-rows%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388624%2fvba-excel-sort-groups-of-cells-rows%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript