LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Finding the avg of several of cells meeting a criterion (index, ma

I have a range of numeric values in A2:A490, and a range of text values in
B2:B490. In C2, I want to have the AVERAGE of all values in A2:A490 that
match against a specific string in B2:B490.

For example ( I hope this formating will work...):

A B C D
1 23 Buy 23.33 21
2 21 Sell
3 21 Sell
4 22 Buy
5 23 Buy

So in C1, I want to have a formula that averages all values in A for which
the corresponding cell on the same row in B contains the word "Buy". In D1 I
want to have the average of all "Sell" numbers. Any suggestions (preferrably
without going into VBA)?

PS. As an extra bonus question, is it possible to set this up so that the
criterion checked for in C1 is whether or not LEFT(B1:B5;1)="Y"? Thanks

 
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
finding index mickimick11mick Excel Worksheet Functions 1 March 9th 08 03:59 PM
Copying cells based on a criterion Chris_t_2k5 Excel Discussion (Misc queries) 4 February 12th 06 02:18 PM
Finding the median of numbers meeting criteria thekovinc Excel Discussion (Misc queries) 3 February 7th 06 12:45 AM
Number of items meeting a > criterion MikeDH Excel Worksheet Functions 2 August 10th 05 08:46 PM
finding the row index for the last value > than some value z.entropic Excel Worksheet Functions 3 April 18th 05 11:32 PM


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