In Excel 2000, Microsoft introduced the ability to color the Sheet name tabs. The Excel VBA macro code below can be used in any Excel Workbook that is at least Excel 2000, or higher. When run it will group all Sheets in the active Workbook by their tab color. To use the code, go to Tools>Macro>Visual Basic Editor (Alt+F11) and then to Insert>Module and paste in the code below.
Sub GroupSheetsByColor() Dim lCount As Long, lCounted As Long Dim lShtLast As Long lShtLast = Sheets.Count For lCount = 1 To lShtLast For lCounted = lCount To lShtLast If Sheets(lCounted).Tab.ColorIndex = Sheets(lCount).Tab.ColorIndex Then Sheets(lCounted).Move Before:=Sheets(lCount) End If Next lCounted Next lCount End Sub
|Convert Excel Formulas from Relative to Absolute|
|Custom Excel Formulas - User Defined Functions/Formulas|
|Parse/Extract File Name from Full File Name and Path|
|Excel: Get Maximum Number Between 2 Numbers|