Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hmm hmm is offline
external usenet poster
 
Posts: 175
Default Functions to ignore hidden rows

I want the functions MATCH, INDEX, and AVERAGE to ignore hidden rows, for the
data range specified.

In addition, worksheet functions containing MATCH will be named, and names
inserted in INDEX. (I have found that, when specifying data ranges for
charts, using names often negates the hiding of rows).

Can it be done?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Functions to ignore hidden rows

Here are average and max in A2:A100 if you have Excel version 2003 and
possibly 2002 (I don't remember when they introduced subtotal for hidden
rows) Earlier versions would get name errors

=SUMPRODUCT(--($A$2:$A$100),SUBTOTAL(103,OFFSET($A$2,ROW($A$2:$A $100)-MIN(ROW($A$2:$A$100)),,)))/SUMPRODUCT(SUBTOTAL(103,OFFSET($A$2,ROW($A$2:$A$10 0)-MIN(ROW($A$2:$A$100)),,)))


=MAX(($A$2:$A$100)*(SUBTOTAL(103,OFFSET($A$2,ROW($ A$2:$A$100)-MIN(ROW($A$2:$A$100)),,))))


the latter needs to be entered with ctrl + shift & enter


If this is a workbook that is supposed to be shared with multiple people
with maybe earlier versions then it is not a good solution, then it is
better to make add-ins of UDF

IMHO it is not a good design to hide rows in ranges that need to be
calculated



--
Regards,

Peo Sjoblom



"hmm" wrote in message
...
I want the functions MATCH, INDEX, and AVERAGE to ignore hidden rows, for
the
data range specified.

In addition, worksheet functions containing MATCH will be named, and names
inserted in INDEX. (I have found that, when specifying data ranges for
charts, using names often negates the hiding of rows).

Can it be done?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Functions to ignore hidden rows

Note that the second formula does not work if all the values are negative


--
Regards,

Peo Sjoblom



"Peo Sjoblom" wrote in message
...
Here are average and max in A2:A100 if you have Excel version 2003 and
possibly 2002 (I don't remember when they introduced subtotal for hidden
rows) Earlier versions would get name errors

=SUMPRODUCT(--($A$2:$A$100),SUBTOTAL(103,OFFSET($A$2,ROW($A$2:$A $100)-MIN(ROW($A$2:$A$100)),,)))/SUMPRODUCT(SUBTOTAL(103,OFFSET($A$2,ROW($A$2:$A$10 0)-MIN(ROW($A$2:$A$100)),,)))


=MAX(($A$2:$A$100)*(SUBTOTAL(103,OFFSET($A$2,ROW($ A$2:$A$100)-MIN(ROW($A$2:$A$100)),,))))


the latter needs to be entered with ctrl + shift & enter


If this is a workbook that is supposed to be shared with multiple people
with maybe earlier versions then it is not a good solution, then it is
better to make add-ins of UDF

IMHO it is not a good design to hide rows in ranges that need to be
calculated



--
Regards,

Peo Sjoblom



"hmm" wrote in message
...
I want the functions MATCH, INDEX, and AVERAGE to ignore hidden rows, for
the
data range specified.

In addition, worksheet functions containing MATCH will be named, and
names
inserted in INDEX. (I have found that, when specifying data ranges for
charts, using names often negates the hiding of rows).

Can it be done?





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
Ignore page breaks for hidden rows T Kirtley Excel Discussion (Misc queries) 1 September 26th 06 06:26 PM
Ignore Hidden Rows on Sum Function on Excel XP Carol Excel Discussion (Misc queries) 11 March 23rd 06 02:39 PM
How do you ignore hidden rows in a countif() function Scott buckwalter Excel Worksheet Functions 9 August 11th 05 08:36 PM
How do I ignore values while copying from hidden rows? Mayank Excel Worksheet Functions 1 July 19th 05 02:48 PM
Ignore Hidden Rows in Sum Function? Jugglertwo Excel Discussion (Misc queries) 3 February 10th 05 01:00 AM


All times are GMT +1. The time now is 07:20 AM.

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

About Us

"It's about Microsoft Excel"