Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / May 2006

Tip: Looking for answers? Try searching our database.

Sort worksheets based on a cell value in each worksheet.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick - 01 May 2006 20:00 GMT
Can this be done?  I have 850ish worksheets in a workbook that I would like
to sort by geographic region - and a cell contains the region value on each
worksheet.  The region value is alpha, btw.  I've checked the existing posts,
and this doesn't seem to be covered, and I have not been able to figure it
out.

Thanks you!
Pete_UK - 02 May 2006 17:45 GMT
Do you mean that you want to re-position the worksheets in the
workbook, based on the region value in each sheet? Can the sheets be
renamed to this region value?

Pete
Patrick - 02 May 2006 18:21 GMT
Yes, I want to re-position the sheets in the book based upon the value of a
cell in each sheet.  

I would prefer not to rename the sheets because they are currently named
after the account which they reference.  Maybe some hybrid  NE-1001 for an
account named 1001 that is in the region NE.  And then sort the sheets by
alpha via the readily accessible solution?  Is this possible?  :-)  I'm open
to any workable programatic solution - I can't manually sort 850 sheets many
times a month.

Thank you!

> Do you mean that you want to re-position the worksheets in the
> workbook, based on the region value in each sheet? Can the sheets be
> renamed to this region value?
>
> Pete
Pete_UK - 03 May 2006 01:19 GMT
You will need a macro to do this. I think a workable solution would be
along the following lines:

Create a new sheet.
Scan through all other worksheets, recording the name of the sheet and
the region code in the range A1 to B850 of the new sheet.
Sort A1:B850 using region code as the sort key.
Scan through this range in sequence to obtain the worksheet name, and
move the sheet with this name to its appropriate position.

Hope this helps to get you started.

Pete
Pete_UK - 03 May 2006 01:52 GMT
Forgot to add:

Delete the new sheet at the end.

Pete
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.