View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Kevin Dunn Kevin Dunn is offline
external usenet poster
 
Posts: 2
Default Sorting Ranges of Data

Hi,

I'm hoping that someone can help me on this. I have a spreadsheet containing
customer info and want to sort/unsort the spreadsheet alphabetically by
customer name. The problem is that each customer record takes up several
rows and columns, and the criteria I want to sort by (Customer Name) is in
column B.
Is there a way to do a sort by Customer Name (B17, B27, B37, etc) so that
the entire customer record (A17:J25, A27:J35, A37:J45, etc) gets moved as
well?

BEFORE SORT
===========
Range Sort by
Customer1 data A17:J25 B17 (Vincent)
Customer2 data A27:J35 B27 (James)
Customer3 data A37:J45 B37 (Cheryl)
Customer4 data A47:J55 B47 (Sally)
Customer5 data A57:J65 B47 (Bob)

AFTER SORT
==========
Range Sort by
Customer5 data A17:J25 B17 (Bob)
Customer3 data A27:J35 B27 (Cheryl)
Customer2 data A37:J45 B47 (James)
Customer4 data A47:J55 B37 (Sally)
Customer1 data A57:J65 B47 (Vincent)

Essntially I want to add a button to my spreadsheet to allow a user to
sort/unsort ranges of customer records by the customer's name. Any hints or
help on this would really be appreciated. Thanks!

Kevin