FREQUENCY and INDIRECT…

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,843
Office Version
  1. 2010
Platform
  1. Windows
I have a workbook that looks at the last 5 football seasons and gives me answers!
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
Anyway as this season is about to finish I need to add those results to my book and drop a season so that I keep my 5 years of data.
<o:p> </o:p>
I’ve been playing around with this book for months now and I’ve just about got it to work apart from the following.
<o:p> </o:p>
It’s reliant on named ranges so I need to remove a range called Teams05 (2005) and replace it with Teams (2010) for example.
<o:p> </o:p>
So if you can imagine this, the current layout of my data is blocks of columns by year on a single sheet…
<o:p> </o:p>
2009-2010 2008-2009 2007-2008 2006-2007 2005-2006
<o:p> </o:p>
I’m about to obliterate 2005 – 2006 and “over-write” that data with 2010-2011
<o:p> </o:p>
All I then want to do is remove the named ranges specific to 2005-2006 and replace them with 2010-2011 ranges.
<o:p> </o:p>
Basically I’m using these formula from another book that is working but I can’t get my INDIRECT correct.
<o:p> </o:p>
{=SUM(IF(FREQUENCY(IF(Teams<>"",MATCH("~"&Teams,Teams&"",0)),ROW(Teams)-ROW(A2)+1),1))} is working
<o:p> </o:p>
I’ve replaced that with…
<o:p> </o:p>
{=SUM(IF(FREQUENCY(IF(INDIRECT(C29)<>"",MATCH("~"&INDIRECT(C29),INDIRECT(C29)&"",0)),ROW(INDIRECT(C29))-ROW(INDEX(INDIRECT(C29),1))+1),1))} which is working
<o:p> </o:p>
I can’t get this one working…
<o:p> </o:p>
=IF(ROWS(D$2:D2)<=$C$2,INDEX(Teams,MATCH(SMALL(IF(Teams<>"",IF(ISNA(MATCH(Teams,$D$1:D1,0)),Range)),1),Range,0)),"")
<o:p> </o:p>
I need to replace “Teams” with “INDIRECT(C29). Range in the above refers to
<o:p> </o:p>
=MMULT((IF(Teams<>"",Teams)>TRANSPOSE(IF(Teams<>"",Teams)))+0,ROW(Teams)^0)
<o:p> </o:p>
I’m also not sure about the following amendment to Range…
<o:p> </o:p>
=MMULT((IF(INDIRECT(B29)<>"",INDIRECT(B29))>TRANSPOSE(IF(INDIRECT(B29)<>"",INDIRECT(B29))))+0,ROW(INDIRECT(B29))^0)
<o:p> </o:p>
Any ideas please anyone?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I’ll simplify my question… :)
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
This formula is working…:)
<o:p> </o:p>
{=IF(ROWS(C$4:C4)<=$B$3,INDEX(Home09,MATCH(SMALL(IF(Home09<>"",IF(ISNA(MATCH(Home09,$C$3:C3,0)),Range)),1),Range,0)),"")}
<o:p> </o:p>
Range refers to:
<o:p> </o:p>
=MMULT((IF(Home09<>"",Home09)>TRANSPOSE(IF(Home09<>"",Home09)))+0,ROW(Home09)^0)
<o:p> </o:p>
In both of those formula how would I replace “Home09” with INDIRECT(C29) please? Using Edit>Replace won't work :confused:
 
Upvote 0
I’ll simplify my question… :)
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
This formula is working…:)
<o:p></o:p>
{=IF(ROWS(C$4:C4)<=$B$3,INDEX(Home09,MATCH(SMALL(IF(Home09<>"",IF(ISNA(MATCH(Home09,$C$3:C3,0)),Range)),1),Range,0)),"")}
<o:p></o:p>
Range refers to:
<o:p></o:p>
=MMULT((IF(Home09<>"",Home09)>TRANSPOSE(IF(Home09<>"",Home09)))+0,ROW(Home09)^0)
<o:p></o:p>
In both of those formula how would I replace “Home09” with INDIRECT(C29) please? Using Edit>Replace won't work :confused:
If the named range Home09 is a dynamic range defined using functions like OFFSET then INDIRECT won't work.
 
Upvote 0
Hello there... No, Home09 ='All Seasons'!$C$30:$C$581
 
Upvote 0
Hello there... No, Home09 ='All Seasons'!$C$30:$C$581
This worked for me...

Convert the formula to a text string. I did that by inserting a single quote to the front of the formula like this:

'=IF(ROWS(C$4:C4)<=$B$3....

Then Edit>Replace worked.

After the change simply remove the single quote and array enter this formula.
 
Upvote 0
When I try to enter I get the warning box "Your formula contains a typed error"... It points to the part I've highlight and underlined...

=IF(ROWS(C$4:C4)<=$B$3,INDEX(INDIRECT(C29),MATCH(SMALL(IF(INDIRECT(C29)<>"",IF(ISNA(MATCH(INDIRECT(C29),$C$3:C3,0)),Range)),1),Range,0)),"")
 
Upvote 0
When I try to enter I get the warning box "Your formula contains a typed error"... It points to the part I've highlight and underlined...

=IF(ROWS(C$4:C4)<=$B$3,INDEX(INDIRECT(C29),MATCH(SMALL(IF(INDIRECT(C29)<>"",IF(ISNA(MATCH(INDIRECT(C29),$C$3:C3,0)),Range)),1),Range,0)),"")
Well, that's a separate issue!

I see you're using Excel 2003. That formula exceeds the nested function limit of 7.
 
Upvote 0
I don't get that sorry, this formula is working...

{=IF(ROWS(C$4:C4)<=$B$3,INDEX(Home09,MATCH(SMALL(IF(Home09<>"",IF(ISNA(MATCH(Home09,$C$3:C3,0)),Range)),1),Range,0)),"")}

How does trying to replace Home09 with INDIRECT(C29) take it over the 7?

I thought the nested function was to do with the IFs?
 
Last edited:
Upvote 0
With you now Biff, I've looked at the nested 7 functions... Thanks friend, I have an idea now. :)
 
Upvote 0
I don't get that sorry, this formula is working...

{=IF(ROWS(C$4:C4)<=$B$3,INDEX(Home09,MATCH(SMALL(IF(Home09<>"",IF(ISNA(MATCH(Home09,$C$3:C3,0)),Range)),1),Range,0)),"")}

How does trying to replace Home09 with INDIRECT(C29) take it over the 7?

I thought the nested function was to do with the IFs?
That's what a lot of people think.

The nested function level limit applies to all formulas, it has nothing to do with a specific function. It's all functions.

In Excel 2007 the nested function limit was increased to 64.
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,916
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top