I have an aggregation workbook, which has a number of worksheets with rows of data like:
Name, value1, value2, . . ., globalsort
globalsort is calculated on these pages to allow ranking in aggregation. As the values change (thereby changing the globalsort value), the subtotal and grand total sheets automatically re-sort. The code I use, called OnChange in the basic sheets, is:
Subtotal Sheet:
Grand Total Sheet:
In the past, this code has worked fine. Now, however, the Name value in each of the original worksheets has a background color (unrelated to the data, so no conditional format) that must fill all the way through to the Grand Total sheet.
In the past, I simply put data in via direct reference (i.e. =(Sheet1!A1)) but that loses the name format. I attempted to just copy/paste the names and do the rest via reference as names/format colors are static, and that almost works. The sub-total pages work and re-sort correctly, but the data at the grand total level (which references the sub total page) does not.
Does anyone know how to either reference formatting or fix my sorting problem?
Thanks in advance,
Frank
Name, value1, value2, . . ., globalsort
globalsort is calculated on these pages to allow ranking in aggregation. As the values change (thereby changing the globalsort value), the subtotal and grand total sheets automatically re-sort. The code I use, called OnChange in the basic sheets, is:
Subtotal Sheet:
Code:
Sub GetAlphaList()
Cells.Sort Key1:=Range("I2"), Order1:=xlDescending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
ThisWorkbook.Worksheets("Aggregate").GetAlphaList
End Sub
Code:
Sub GetAlphaList()
Cells.Sort Key1:=Range("N2"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
In the past, I simply put data in via direct reference (i.e. =(Sheet1!A1)) but that loses the name format. I attempted to just copy/paste the names and do the rest via reference as names/format colors are static, and that almost works. The sub-total pages work and re-sort correctly, but the data at the grand total level (which references the sub total page) does not.
Does anyone know how to either reference formatting or fix my sorting problem?
Thanks in advance,
Frank