Macro that sort on clnm populated by indirect

M

missy.cissell

Hi!
Any help is much appreciated!!
I have a form that has a sales column that populates by an indirect
formula that pulls data from different worksheets based on dynamic
info (if A=0, then this worksheet, etc). I have then setup a macro to
sort on this column-when i setup the macro the indirect pulled from
WorksheetA.
However, when the Indirect formula pulls from WorksheetB the data is
displayed properly (formula resulting what i expect), but when i hit
the button to run the macro it still sorts based on WorksheetA.

the column that Im sorting on has this formula
=IF(W11>0,(SUMIF(INDIRECT(""&$T$5&""&""&$AY$5&""),$H11,INDIRECT(""&$T
$5&""&""&$AY$4&""))),0)
First checking that there is a sales plan
sumif, dynamically pulling the sheetname and column to pull from.

Any ideas on what Im doing wrong?
thanks soo much in advance-Ive given myself a headache!
 
M

missy.cissell

what does your sort macro look like?

-chad







- Show quoted text -

Hi Chad!
I just used the record macro button in the form...I'm not a
programmer..so I'm really out of my realm!!
Record macro then hit Data-Sort etc.

When I look at the code it created i think this is the part that does
the sort.

Range("A10:BB109").Select
Selection.Sort Key1:=Range("AK10"), Order1:=xlDescending,
Key2:=Range( _
"H10"), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1,
MatchCase _
:=True, Orientation:=xlTopToBottom

thanks for any insight!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top