View Single Post
  #2 (permalink)  
Old 07-24-2008, 04:19 PM
Pete_UK
 
Posts: n/a
Re: Wrapping sheets within a workbook

You would need a macro to do that. This is an example of a Merge Sort
algorithm - you would need to sort each individual sheet, and then you
could look at the topmost item in each sheet and decide which record
should be written to a new sheet (and adjust a counter for the sheet
where that record lies). Then keep repeating this, looking at the
topmost item (as defined by the counters in each sheet), writing the
record to a new sheet and adjusting the appropriate counter. Another
check needs to be made to see how many records have been written to
the new sheet, so that a further new sheet can be used after 65536
records. It would be possible to remove duplicates as part of this
process.

You would end up with 3 - 5 sheets, where the first might cover A-E,
then F-L, then M-R etc.

I don't recall seeing examples of a merge sort algorithm being coded
on any of the usual web-sites.

Hope this helps.

Pete

On Jul 24, 12:56*pm, OfficeManager
<OfficeMana...@discussions.microsoft.com> wrote:
> I am working with raw data in Excel 2003 in a workbook where there are 3-5
> sheets completely filled with data, all 65536 rows. *There are duplicates
> scattered throughout the sheets. *Is there a way I can link all the sheets
> together so that when I do a sort, it will sort all the rows on each sheet
> within the workbook?


Reply With Quote