Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel sort column with indirectly referenced dymanic worksheet
I have searched for help everywhere, please please help me!!!
In my excel file, a column is populated by an indirect formula that pulls data from different worksheets based on dynamic info (if A=0, then WorksheetA, if A=1 WorksheetB, etc). I have then setup a macro to sort a table on this column (just by doing record macro, data sort etc- no programming involved) When i created the macro, the indirect pulled from WorksheetA. However, when the Indirect formula pulls from WorksheetB the data is still sorted it by WorksheetA after executing the macro, but the cells are displaying what i expect-from worksheetb. Therefore the indirect formula is correct. Is it possible for the macro to understand the sorting based on different worksheets? The column that Im sorting on has this formula: =IF(W110,(SUMIF(INDIRECT(""&$T$5&""&""&$AY$5&""), $H11,INDIRECT(""&$T $5&""&""&$AY$4&""))),0) .........If something isnt 0, sumif, dynamically pulling the sheetname and column to get data from. Then the code that was created that relates to that sort in the macro is this: Range("A10:BB109").Select Selection.Sort Key1:=Range("AK10"), Order1:=xlDescending, Key2:=Range( _ "H10"), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase _ :=True, Orientation:=xlTopToBottom -desperately seeking help. -Missy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Want blank cell displayed if indirectly referenced value is zero | Excel Worksheet Functions | |||
Excel 2003 - How do I sort subjects in a worksheet by column? | Excel Worksheet Functions | |||
Sort referenced sheets together! | Excel Worksheet Functions | |||
Need to indirectly reference columns 26 using A1 notation based on numeric column number- how to? | Excel Worksheet Functions | |||
Getting value from an unopened file (indirectly referenced) | Excel Programming |