Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Average without Hidden Cells

I need to average values in a row, where some columns may be hidden. I do not
want the hidden values to be used in the Average calculation. The hidden
column may not always be the same. Can this be done without itemizing the
cells in the Average formula?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default Average without Hidden Cells

If you have XL 2003 or later:
=SUBTOTAL(101,A2:E2)

--
Best Regards,

Luke M
"Goody" wrote in message
...
I need to average values in a row, where some columns may be hidden. I do
not
want the hidden values to be used in the Average calculation. The hidden
column may not always be the same. Can this be done without itemizing the
cells in the Average formula?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Average without Hidden Cells

Hi,

Annoyingly the SUBTOTAL function does this on columns only and not rows so
we have to improvise.

say your date are in A1 - J1
put this in A2 and drag right to J2

=CELL("width",A1)0
You can now hide this row if you want

Now if you have E2007 use the formula below to average visible rows only
=AVERAGEIF(A2:J2,TRUE,A1:J1)

If you don't have e2007 then use
=SUMIF(A2:J2,TRUE,A1:J1)/COUNTIF(A2:J2,TRUE)

One note is that hiding/unhiding rows/cols doesn't cause Excel to calculate
so if you hide/unhide then tap F9 to get the result to update
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Goody" wrote:

I need to average values in a row, where some columns may be hidden. I do not
want the hidden values to be used in the Average calculation. The hidden
column may not always be the same. Can this be done without itemizing the
cells in the Average formula?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Average without Hidden Cells

Luke,

That only works on columns.
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Luke M" wrote:

If you have XL 2003 or later:
=SUBTOTAL(101,A2:E2)

--
Best Regards,

Luke M
"Goody" wrote in message
...
I need to average values in a row, where some columns may be hidden. I do
not
want the hidden values to be used in the Average calculation. The hidden
column may not always be the same. Can this be done without itemizing the
cells in the Average formula?



.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default Average without Hidden Cells

Thanks for the correction. Since the basic functionality worked across
columns, and made the bad assumption that it would handle the hiding of
columns.

--
Best Regards,

Luke M
"Mike H" wrote in message
...
Luke,

That only works on columns.
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Luke M" wrote:

If you have XL 2003 or later:
=SUBTOTAL(101,A2:E2)

--
Best Regards,

Luke M
"Goody" wrote in message
...
I need to average values in a row, where some columns may be hidden. I
do
not
want the hidden values to be used in the Average calculation. The
hidden
column may not always be the same. Can this be done without itemizing
the
cells in the Average formula?



.



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
Copy Visible Cells in Sheet with Merged and Hidden Cells rtwiss Excel Discussion (Misc queries) 5 April 25th 23 09:08 AM
How to ignore hidden columns in an "Average" formula? DotK Excel Discussion (Misc queries) 8 January 1st 10 01:49 PM
drag data vertically over hidden cells.. ignore hidden cells Derwood Excel Discussion (Misc queries) 1 March 6th 08 10:59 PM
average cells, show 0 if nothing to average Kycajun Excel Discussion (Misc queries) 8 June 21st 06 07:36 PM
How do I paste hidden cells and keep them hidden? steven345 Excel Discussion (Misc queries) 0 January 30th 06 05:50 PM


All times are GMT +1. The time now is 09:01 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"