LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default SUMIF/COUNTIF with missing data

The 1st one is a bit lenghty; but I would prefer the 1st one..

--
Jacob


"AAA1986" wrote:

Thanks! The first one works great. But what's the difference between the
first one and the array one? Is there any reason I should use one instead of
the other?

"Jacob Skaria" wrote:

Try

=SUMIF($A$1:$A$10,"Blue",$B$1:$B$10)/SUMPRODUCT(($A$1:$A$10="Blue")
*(B1:B10<""))

OR try the below array formula. You create array formulas in the same way
that you create other formulas, except you press CTRL+SHIFT+ENTER to enter
the formula. If successful in 'Formula Bar' you can notice the curly braces
at both ends like "{=<formula}"

=AVERAGE(IF(A1:A10="Blue",IF(B1:B10<"",B1:B10)))

--
Jacob


"AAA1986" wrote:

Right now, I'm using the following function to get the average of column B,
given that column A has a certain criteria:


=SUMIF($A$1:$A$10,"=Blue",$B$1:$B$10)/COUNTIF($A$1:$A$10,"=Blue")

Which works fine, except that for some of the entries whose A column says
"blue" there is no data in the B column, so the denominator is off. How can I
account for missing data in this function?

Thanks in advance.

 
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
Countif & Sumif fx ref data in multiple columns hal1011 Excel Worksheet Functions 7 April 3rd 09 10:46 PM
Countif & Sumif JulesHR Excel Worksheet Functions 7 May 29th 08 04:20 PM
Sumif / Countif - Not certain - want to extract data from cell and M.A. Clark Excel Worksheet Functions 30 January 10th 08 10:43 AM
COUNTIF/SUMIF comparing two rows of data [email protected] Excel Worksheet Functions 3 November 30th 07 04:46 PM
COUNTIF or SUMIF or ?? croakingtoad Excel Worksheet Functions 2 November 28th 05 03:05 PM


All times are GMT +1. The time now is 05:45 PM.

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"