Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default AVERAGEIF Function out there?

Does anybody have an "AVERAGEIF" function they could pass
on to me? I'm new to programming and have failed miserably
trying to write it. Any help would be great. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default AVERAGEIF Function out there?


"davidad" wrote in message
...
Does anybody have an "AVERAGEIF" function they could pass
on to me? I'm new to programming and have failed miserably
trying to write it. Any help would be great. Thanks.


I don't quite understand what AVERAGEIF means. Please explain.

/Fredrik


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default AVERAGEIF Function out there?

I am also confused, because it seems you could simply do a combination
of IF statements and Average statements

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default AVERAGEIF Function out there?



--

HTH

RP
(remove nothere from the email address if mailing direct)


"davidad" wrote in message
...
Does anybody have an "AVERAGEIF" function they could pass
on to me? I'm new to programming and have failed miserably
trying to write it. Any help would be great. Thanks.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default AVERAGEIF Function out there?

something like

=AVERAGE(IF(B2:B102,B2:B10))

which is an array formula, so commit with Ctrl-Shift-Enter

--

HTH

RP
(remove nothere from the email address if mailing direct)


"davidad" wrote in message
...
Does anybody have an "AVERAGEIF" function they could pass
on to me? I'm new to programming and have failed miserably
trying to write it. Any help would be great. Thanks.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default AVERAGEIF Function out there?

Like Sumif or Countif

--
Regards,
Tom Ogilvy

"Chip" wrote in message
oups.com...
I am also confused, because it seems you could simply do a combination
of IF statements and Average statements



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default AVERAGEIF Function out there?

Bob Phillips wrote

which is an array formula, so commit with Ctrl-Shift-Enter


Could you give a brief explanation of criteria for array formulas?
I've never been able to grasp what makes one an array type.

--
David
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default AVERAGEIF Function out there?

=AVERAGE(IF(B2:B102,B2:B10))

B2:B102

this says for each cell in B2:B10, is the cell 2. So you are working
with a range or array of data. where you want each row handled as a
separate entity returning an array of values. So if the cells were filled
sequentially from B2 to B10 as 2, 3, 4, . . . , 8, 9, 10

then evaluation of IF(B2:B102,B2:B10) would return
{false;3;4;5;6;7;8;9;10} (an array of values)

put the whole formula in a cell and Enter it with Ctrl+Shift+enter

now select the cell and go to the formula bar. Select this much of the
formula IF(B2:B102,B2:B10) and hit F9. This should return the array
above. hit escape to remove the evaluation and leave the original formula.


--
Regards,
Tom Ogilvy

"David" wrote in message
...
Bob Phillips wrote

which is an array formula, so commit with Ctrl-Shift-Enter


Could you give a brief explanation of criteria for array formulas?
I've never been able to grasp what makes one an array type.

--
David



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default AVERAGEIF Function out there?

David,

If I understand the perspective of your question, Excel functions normally
work on an array or range of values, or a single value. For instance, SUM
works on an array of values, IF works on a single value. But, often, some
other criteria is wanted to be applied to the range before SUMming it (or
MAXing, MINing, etc.). If that criteria involves a function that would
normally apply to a single value, there is a problem. This can be overcome
by using it as an array formula, in which the single value function gets
evaluated for each element of the array, and the result of each is then
returned to the other function that happily handles arrays. If you check
Tom's post, you can see how that evaluates with this particular formula.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"David" wrote in message
...
Bob Phillips wrote

which is an array formula, so commit with Ctrl-Shift-Enter


Could you give a brief explanation of criteria for array formulas?
I've never been able to grasp what makes one an array type.

--
David



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default AVERAGEIF Function out there?

Tom & Bob,

Thanks. Much better understood now.

--
David
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
Is there an AVERAGEIF function in excel? lisab Excel Discussion (Misc queries) 5 November 9th 09 06:46 PM
Averageif function Kevin Anderson Excel Worksheet Functions 4 January 29th 08 11:31 AM
averageif function curtll Excel Worksheet Functions 8 May 8th 06 03:48 AM
Create an AVERAGEIF function. as Excel Worksheet Functions 2 March 2nd 05 01:27 PM
AVERAGEIF Function out there? davidad Excel Discussion (Misc queries) 2 January 21st 05 05:52 PM


All times are GMT +1. The time now is 12:20 PM.

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"