View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Michael Michael is offline
external usenet poster
 
Posts: 791
Default sorting and copying

Try sorting all 14 columns based on column 4 (ascending or descending it
doesn't matter) then place a filter on column 4 your code should be a for
next loop. Inside the loop will go the filtering based on x and the selection
of the visible area plus cutting or copying to a new page. Maybe you should
post in the excel.coding and not on this board. Just a suggestion.
i.e.:

for i=x to y

next x

Michael Arch.

"Stan Halls" wrote:

dont know if this it to much to do via a script but here goes
i have a file with 700 lines or so by 14 columns of data , in the 4th column
i have a list of numbers ,
what i am after is someway of when a change in the number in the 4th column
appears,select all the data above with the same number and either copy/cut
that data to a new file or even a new tab (naming that tab to the same as the
number) in the same file , then continue till the next change in column 4
and so on till the page is empty. so i end up with a file full of tabs for
each number change....

maybe its to much , thanks for trying in advance