Sunday, 15 October 2017

Hints - Microsoft Excel - Ordering Worksheets Based on a Cell Value

Sort the worksheets in your workbook based on the worksheet names.
You may have a series of worksheets that share the same general layout, and you want the worksheets ordered based on the value in cell H7 of each worksheet.
You will need a macro.
The macro will need to step through each worksheet in the workbook, and then check the key cell in each subsequent worksheet to see how it compares to the same cell in other worksheets. 
If the cell value is less than the current worksheet, then the worksheet that contains the lesser value can be moved.

Note the use of the Move method, which does the actual movement of the worksheets. The names of the worksheets don't matter, only their positioning based on the value in cell H7 of each worksheet.

Microsoft Accredited IT Training Provider
Microsoft Certified Training Materials
IT Training Courses delivered by Microsoft Accredited Facilitators
Microsoft MOS Test Centre London

No comments:

Post a Comment