Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Sorting blocks of data or named fields?
Hi
I have a sort problem that I have approached from a number of angles and cannot seem to find a solution to, I am using excel xp. I have produced a web query which has returned a list which has a number of "blocks" of information each of which is four columns by four rows with two blank lines between each block. Each "block" has a number of blank spaces within it. I wish to sort the "blocks" of information(Kept together) based upon a value within the "block" I have tried a simple sort and the blocks have been broken up when sorted, I have tried to alocate a range name to each block, but how then to sort? I have filled up all the blank cells with a value, then sorted the list it is then again broken up. The next way I am thinking to solve the problem is to convert the "block" of info into a single row so that the sort can be performed but I am at a loss as to how to automate this to allow for the blank cells within each "block" which are not always in the same place. I have recorded a macro to do this for one "block" but then how to enable the macro to know to do the whole page and know where each "block" starts. I would be grateful to be directed towards a solution that I can modify and learn to solve the problem. Thanks all Greg |
#2
|
|||
|
|||
hi,
use a helper column. number each block in the order you want to sort then. block1 would all be numbered 1 block2 would all be numbered 2 then sort by the helper column. this will keep the blocks togeather good luck. -----Original Message----- Hi I have a sort problem that I have approached from a number of angles and cannot seem to find a solution to, I am using excel xp. I have produced a web query which has returned a list which has a number of "blocks" of information each of which is four columns by four rows with two blank lines between each block. Each "block" has a number of blank spaces within it. I wish to sort the "blocks" of information(Kept together) based upon a value within the "block" I have tried a simple sort and the blocks have been broken up when sorted, I have tried to alocate a range name to each block, but how then to sort? I have filled up all the blank cells with a value, then sorted the list it is then again broken up. The next way I am thinking to solve the problem is to convert the "block" of info into a single row so that the sort can be performed but I am at a loss as to how to automate this to allow for the blank cells within each "block" which are not always in the same place. I have recorded a macro to do this for one "block" but then how to enable the macro to know to do the whole page and know where each "block" starts. I would be grateful to be directed towards a solution that I can modify and learn to solve the problem. Thanks all Greg . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Colors of columns after sorting data in the supporting table | Charts and Charting in Excel | |||
Sorting Spreadsheet with Merged Fields | Excel Discussion (Misc queries) | |||
Pulling data from 1 sheet to another | Excel Worksheet Functions | |||
Excel2K: Is it possible to use dynamic named ranges in custom data validation formula? | Excel Discussion (Misc queries) | |||
Named dynamic ranges, copied worksheets and graph source data | Charts and Charting in Excel |