PDA

View Full Version : [SOLVED:] Sort range from one empty row to the next empty row Custom



Bon
11-24-2022, 10:24 AM
Hello everyone,

I have an Excel spreadsheet where columns A,B;C,D are filled with data.


The first line is empty and should remain empty.


Column B shows the engine model and every time there is an engine change, there is a blank line.


In the photo is line 6.


I now want to sort the first area up to the empty row ascending first by column C then by column A.


Then the area should be taken by the empty row to the next empty line and sorted again by column C and column A ascending.


And so on.


Attach a photo section of my file.


How do I have to write the VBA command, since the lines for sorting can always be of different lengths. Ask for help.

Vielen Dank im Voraus.30341

arnelgp
11-24-2022, 09:39 PM
see the sub on module1.

Bon
11-25-2022, 06:10 AM
wow a lot of thanks to you that is great. This is exactly that what i searched. Regards

p45cal
11-26-2022, 04:57 AM
Thanks for the feedback.