Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default Excluding Hidden Rows from calculations

Not sure if this can be done??

I have a worksheet where a number of the rows are hidden and need to exclude
these from calculations performed using SUMPRODUCT, ie;

=SUMPRODUCT(--(A1:A2000=C1)*(B1:B2000=D1))

but only looking at rows that are not hidden.

Is there a relatively simple way of doing this? If not I will just create
another column to show an 'X' when the row is not to be counted and then
make the calculation:

=SUMPRODUCT(--(A1:A2000=C1)*(B1:B2000=D1)*(E1:E2000<"X"))

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Excluding Hidden Rows from calculations

It depends on the Excel version, 2003 and later can ignore hidden as in
formatrowhide,
earlier versions can ignore hidden by a filter
Also if you are going to use unary minuses it should look like this\


=SUMPRODUCT(--(A1:A2000=C1),--(B1:B2000=D1))

otherwise you might as well remove it and use


=SUMPRODUCT((A1:A2000=C1)*(B1:B2000=D1))



Anyway with 2003 and later and hidden rows as opposed to filtered rows us

=SUMPRODUCT(--(A1:A2000=C1),--(B1:B2000=D1),SUBTOTAL(103,OFFSET($A$1,ROW($A$1:$A $2000)-MIN(ROW($A$1:$A$1000)),,)))



--


Regards,


Peo Sjoblom




"Terry Bennett" wrote in message
...
Not sure if this can be done??

I have a worksheet where a number of the rows are hidden and need to
exclude these from calculations performed using SUMPRODUCT, ie;

=SUMPRODUCT(--(A1:A2000=C1)*(B1:B2000=D1))

but only looking at rows that are not hidden.

Is there a relatively simple way of doing this? If not I will just create
another column to show an 'X' when the row is not to be counted and then
make the calculation:

=SUMPRODUCT(--(A1:A2000=C1)*(B1:B2000=D1)*(E1:E2000<"X"))

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default Excluding Hidden Rows from calculations

Wow!

Many thanks Peo.


"Peo Sjoblom" wrote in message
...
It depends on the Excel version, 2003 and later can ignore hidden as in
formatrowhide,
earlier versions can ignore hidden by a filter
Also if you are going to use unary minuses it should look like this\


=SUMPRODUCT(--(A1:A2000=C1),--(B1:B2000=D1))

otherwise you might as well remove it and use


=SUMPRODUCT((A1:A2000=C1)*(B1:B2000=D1))



Anyway with 2003 and later and hidden rows as opposed to filtered rows us

=SUMPRODUCT(--(A1:A2000=C1),--(B1:B2000=D1),SUBTOTAL(103,OFFSET($A$1,ROW($A$1:$A $2000)-MIN(ROW($A$1:$A$1000)),,)))



--


Regards,


Peo Sjoblom




"Terry Bennett" wrote in message
...
Not sure if this can be done??

I have a worksheet where a number of the rows are hidden and need to
exclude these from calculations performed using SUMPRODUCT, ie;

=SUMPRODUCT(--(A1:A2000=C1)*(B1:B2000=D1))

but only looking at rows that are not hidden.

Is there a relatively simple way of doing this? If not I will just
create another column to show an 'X' when the row is not to be counted
and then make the calculation:

=SUMPRODUCT(--(A1:A2000=C1)*(B1:B2000=D1)*(E1:E2000<"X"))

Thanks.





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Excluding Hidden Rows from calculations

You are welcome


--

Regards,

Peo Sjoblom





"Terry Bennett" wrote in message
...
Wow!

Many thanks Peo.


"Peo Sjoblom" wrote in message
...
It depends on the Excel version, 2003 and later can ignore hidden as in
formatrowhide,
earlier versions can ignore hidden by a filter
Also if you are going to use unary minuses it should look like this\


=SUMPRODUCT(--(A1:A2000=C1),--(B1:B2000=D1))

otherwise you might as well remove it and use


=SUMPRODUCT((A1:A2000=C1)*(B1:B2000=D1))



Anyway with 2003 and later and hidden rows as opposed to filtered rows us

=SUMPRODUCT(--(A1:A2000=C1),--(B1:B2000=D1),SUBTOTAL(103,OFFSET($A$1,ROW($A$1:$A $2000)-MIN(ROW($A$1:$A$1000)),,)))



--


Regards,


Peo Sjoblom




"Terry Bennett" wrote in message
...
Not sure if this can be done??

I have a worksheet where a number of the rows are hidden and need to
exclude these from calculations performed using SUMPRODUCT, ie;

=SUMPRODUCT(--(A1:A2000=C1)*(B1:B2000=D1))

but only looking at rows that are not hidden.

Is there a relatively simple way of doing this? If not I will just
create another column to show an 'X' when the row is not to be counted
and then make the calculation:

=SUMPRODUCT(--(A1:A2000=C1)*(B1:B2000=D1)*(E1:E2000<"X"))

Thanks.







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
Sum of a column excluding hidden rows mnwild1 Excel Worksheet Functions 10 June 22nd 07 11:24 PM
Counting non-blank cells in a column, excluding hidden rows SisterDell Excel Worksheet Functions 3 June 1st 07 03:31 PM
excluding #DIV/0! in further calculations tom ossieur Excel Worksheet Functions 5 March 5th 07 07:18 PM
Need to sum columns, excluding hidden ones - like 'subtotal' for r psill Excel Discussion (Misc queries) 0 October 12th 06 08:14 PM
paste excel sheet excluding hidden rows Bernie Excel Discussion (Misc queries) 3 March 5th 06 02:17 PM


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

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"