#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 460
Default Column Lookup?

I have reference data in Column "$Q$3:$Q$502" of "sheet1". For all cells in
the reference column that contain "yes", I would like to average quantity in
cells for Column $S$3:$S$502 respectively.

So if it finds 3 in column Q with "Yes" (2,3,4) , it will return the number 3.
--
Thank you!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Column Lookup?

Hi,

=AVERAGEIF($Q$3:$Q$502,"YES",$S$3:$S$502)

"Doug" wrote:

I have reference data in Column "$Q$3:$Q$502" of "sheet1". For all cells in
the reference column that contain "yes", I would like to average quantity in
cells for Column $S$3:$S$502 respectively.

So if it finds 3 in column Q with "Yes" (2,3,4) , it will return the number 3.
--
Thank you!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default Column Lookup?

for pre-2007:
=SUMIF(Q3:Q502,"Yes",S3:S502)/COUNTIF(Q3:Q502,"Yes")

--
Best Regards,

Luke M
"Eduardo" wrote in message
...
Hi,

=AVERAGEIF($Q$3:$Q$502,"YES",$S$3:$S$502)

"Doug" wrote:

I have reference data in Column "$Q$3:$Q$502" of "sheet1". For all cells
in
the reference column that contain "yes", I would like to average quantity
in
cells for Column $S$3:$S$502 respectively.

So if it finds 3 in column Q with "Yes" (2,3,4) , it will return the
number 3.
--
Thank you!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7,247
Default Column Lookup?

Try

=AVERAGE(IF(Q3:Q502="yes",S3:S502,FALSE))

This is an array formula, so you MUST press CTRL SHIFT ENTER rather
than just ENTER when you first enter the formula and whenever you edit
it later. If you do this correctly, Excel will display the formula in
the formula bar enclosed in curly braces { }. You don't type in the
braces; Excel puts them there automatically. The formula will not work
correctly if you do not enter it with CTRL SHIFT ENTER. See
www.cpearson.com/Excel/ArrayFormulas.aspx for much more information
about array formulas.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com





On Fri, 14 May 2010 09:34:01 -0700, Doug
wrote:

I have reference data in Column "$Q$3:$Q$502" of "sheet1". For all cells in
the reference column that contain "yes", I would like to average quantity in
cells for Column $S$3:$S$502 respectively.

So if it finds 3 in column Q with "Yes" (2,3,4) , it will return the number 3.

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
Lookup looks to the prior column if zero appears in the lookup col kenbquik Excel Discussion (Misc queries) 2 March 12th 09 03:41 AM
LookUp Function with Two Column Search Returning One Column Value insitedge Excel Worksheet Functions 8 March 3rd 08 05:59 AM
lookup text in one column, count in another column dmshurley Excel Worksheet Functions 1 August 17th 07 11:32 PM
Lookup in one column, and return value from another column fdebelo Excel Worksheet Functions 2 January 8th 06 01:55 PM
Calculating totals in a column based on a lookup in another column Michael Wright via OfficeKB.com Excel Worksheet Functions 1 April 15th 05 09:52 AM


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