Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gai Gai is offline
external usenet poster
 
Posts: 16
Default Count/average function with filters

I have just worked out that a formula I have been using is not working as I
thought. I am trying to 1) count a number of occurances of a certain risk
appearing, and 2) average them. I filter the data on Sheet1 and Sheet2 is a
reporting page where I do the calculations. I have tried:

Subtotal(1,$AA$5:$AA$992) -for average and subtotal(3,$AA$5:$AA$992) for
count.
AND
SUMPRODUCT(SUBTOTAL(1,OFFSET(Sheet1!$AA$5:$AA$992, ROW(Sheet1!$AA$5:$AA$992)-MIN(ROW(Sheet1!$AA$5:$AA$992)),,1)),--(???)

The question mark is where I come into diffculty. What do I say it equals? I
filter on column A which is a concatenate formula based on month and year.
Each time the report is retrieved it is for different months/years. Because I
made it for others to use, I can't just alter the formula each time.

Could someone help - quickly!!
Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default Count/average function with filters

In the last formula what are you trying to calculate.

May an example would help.

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Gai" wrote:

I have just worked out that a formula I have been using is not working as I
thought. I am trying to 1) count a number of occurances of a certain risk
appearing, and 2) average them. I filter the data on Sheet1 and Sheet2 is a
reporting page where I do the calculations. I have tried:

Subtotal(1,$AA$5:$AA$992) -for average and subtotal(3,$AA$5:$AA$992) for
count.
AND
SUMPRODUCT(SUBTOTAL(1,OFFSET(Sheet1!$AA$5:$AA$992, ROW(Sheet1!$AA$5:$AA$992)-MIN(ROW(Sheet1!$AA$5:$AA$992)),,1)),--(???)

The question mark is where I come into diffculty. What do I say it equals? I
filter on column A which is a concatenate formula based on month and year.
Each time the report is retrieved it is for different months/years. Because I
made it for others to use, I can't just alter the formula each time.

Could someone help - quickly!!
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gai Gai is offline
external usenet poster
 
Posts: 16
Default Count/average function with filters

Ok here goes.

Column A Column B Column AA
112006 15/11/2006 5
112006 11/12/2006 5
122006 1/12/2006 4
122006 2/12/2006 5
122006 12/12/2006 2
122006 12/12/2006 1
122006 15/12/2006 3
012007 01/01/2007 4
012007 01/01/2007 2

Column A is a formula basically = Column B (but I show it just as monthyear
to filter on- sorry I did say this was a concatenate formula)

I tried a sumtotal formula thinking that that worked on filtered items but
it isn't working. I just tried it again, and it gave me a number <1. Data in
column AA does not yet reach 992, but the filter should filter out all the
unused columns, so I don't know why the fraction (it didn't give me this
result last time).

I tried sumproduct with subtotal as described below but kept getting
confused how it might apply.

What I need is that whatever it filters on, subtotal formula will average
(or count )depending on which I choose.

Is that clearer?? I hope I have explained myself better.

--
Gai


"Martin Fishlock" wrote:

In the last formula what are you trying to calculate.

May an example would help.

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Gai" wrote:

I have just worked out that a formula I have been using is not working as I
thought. I am trying to 1) count a number of occurances of a certain risk
appearing, and 2) average them. I filter the data on Sheet1 and Sheet2 is a
reporting page where I do the calculations. I have tried:

Subtotal(1,$AA$5:$AA$992) -for average and subtotal(3,$AA$5:$AA$992) for
count.
AND
SUMPRODUCT(SUBTOTAL(1,OFFSET(Sheet1!$AA$5:$AA$992, ROW(Sheet1!$AA$5:$AA$992)-MIN(ROW(Sheet1!$AA$5:$AA$992)),,1)),--(???)

The question mark is where I come into diffculty. What do I say it equals? I
filter on column A which is a concatenate formula based on month and year.
Each time the report is retrieved it is for different months/years. Because I
made it for others to use, I can't just alter the formula each time.

Could someone help - quickly!!
Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gai Gai is offline
external usenet poster
 
Posts: 16
Default Count/average function with filters

Sorry Martin. I found the problem- it was with the database itself. Because I
was only testing the formula, I did not complete all columns in the data set,
so it therefore didn't see it as a continuation of the data. When I completed
all columns and therefore had completed data, I found the Subtotal formula
worked. Sorry to have wasted your time. THanks for your help. I'll try to
hide my blonde a bit better next time.

Regards from Australia

Gai


"Martin Fishlock" wrote:

In the last formula what are you trying to calculate.

May an example would help.

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Gai" wrote:

I have just worked out that a formula I have been using is not working as I
thought. I am trying to 1) count a number of occurances of a certain risk
appearing, and 2) average them. I filter the data on Sheet1 and Sheet2 is a
reporting page where I do the calculations. I have tried:

Subtotal(1,$AA$5:$AA$992) -for average and subtotal(3,$AA$5:$AA$992) for
count.
AND
SUMPRODUCT(SUBTOTAL(1,OFFSET(Sheet1!$AA$5:$AA$992, ROW(Sheet1!$AA$5:$AA$992)-MIN(ROW(Sheet1!$AA$5:$AA$992)),,1)),--(???)

The question mark is where I come into diffculty. What do I say it equals? I
filter on column A which is a concatenate formula based on month and year.
Each time the report is retrieved it is for different months/years. Because I
made it for others to use, I can't just alter the formula each time.

Could someone help - quickly!!
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
Fill Function to next Column shital shah Excel Worksheet Functions 0 August 16th 06 02:53 PM
VBA Monty Excel Worksheet Functions 2 January 30th 06 01:37 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


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