Determine if a worksheet is sorted

  • Thread starter Thread starter Fox via OfficeKB.com
  • Start date Start date
F

Fox via OfficeKB.com

Is there any way (property or otherwise) in VBA to determine if a worksheet
is already sorted, and if so, what the sort key(s) is/are?
 
Not that I know of. You could write a macro to loop through all the
columns, and in each column, loop through all the cells and determine by
brute force if that column is sorted either ascending or descending. That
would be an indicator that the data is sorted by that one column, but even
that is not foolproof. HTH Otto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top