Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Macro that sort on clnm populated by indirect

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(W110,(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!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 273
Default Macro that sort on clnm populated by indirect

what does your sort macro look like?

-chad

" wrote:

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(W110,(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!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Macro that sort on clnm populated by indirect

On Mar 2, 9:04 am, Chad wrote:
what does your sort macro look like?

-chad



" wrote:
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(W110,(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!- Hide quoted text -


- 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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Allow EXCEL INDIRECT(ADDRESS()) and INDIRECT(RANGE()) functions Mike Barlow Excel Worksheet Functions 7 May 21st 23 07:42 PM
Sort cells populated with an Indirect function. JonR Excel Worksheet Functions 0 June 20th 06 04:15 PM
populated Abhishek kedia Excel Discussion (Misc queries) 3 May 9th 06 08:45 PM
Macro Help: Concatenate Populated Cells in Column A TJM Excel Discussion (Misc queries) 3 June 11th 05 11:25 AM
Using Indirect & Creating a worksheet Macro Bill Healy Excel Worksheet Functions 1 November 5th 04 10:51 AM


All times are GMT +1. The time now is 03:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"