I am looking for a custom VBA Function that will check if a list is sorted Ascending or Descending, and will flip the sort orientation based on the result...
So basically if a list is either A - Sorted Descending or B - Unsorted, the function would return FALSE, otherwise it would return TRUE.
From there I can specify how to resort the list.
I thought I could load the list range into an array, then test array(i) to see if it matches the first row in my list, and repeat that process for maybe 10 or 15 rows, to determine if the list is sorted...
Does that sound plausible?
I am just trying to place a button at the top of the column where when the user clicks it the first time it will sort ascending, then after that it will toggle between ascending and descending.
So basically if a list is either A - Sorted Descending or B - Unsorted, the function would return FALSE, otherwise it would return TRUE.
From there I can specify how to resort the list.
I thought I could load the list range into an array, then test array(i) to see if it matches the first row in my list, and repeat that process for maybe 10 or 15 rows, to determine if the list is sorted...
Does that sound plausible?
I am just trying to place a button at the top of the column where when the user clicks it the first time it will sort ascending, then after that it will toggle between ascending and descending.