Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have two columns of data
I want a total count (not sum) of the first column only if the corresponding second column is not blank -- Thanks |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try:-
=SUMPRODUCT((A1:A5<"")*(B1:B5="")) Extend A5 - B5 as required Mike "Jeff" wrote: I have two columns of data I want a total count (not sum) of the first column only if the corresponding second column is not blank -- Thanks |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
The way you put it, you basically only want to count the non-blank
cells of 2nd col. If so, a generic solution involving SUMPRODUCT (and not using one of the COUNTx functions): =SUMPRODUCT(--(B1:B10<"")) If you want a COUNTIF on A:A (e.g. all the 5's where B:B is not blank, =SUMPRODUCT((A1:A10=5)*(B1:B10<"")) Note: the -- in the first formula is to convert the TRUE/FALSE that the expression produces into 1/0 so that they can be summed (logical values are ignored by aggregate functions). In the second case multiplication does the conversion thus the -- is not needed. HTH Kostis Vezerides HTH On Jul 6, 5:50 pm, Jeff wrote: I have two columns of data I want a total count (not sum) of the first column only if the corresponding second column is not blank -- Thanks |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I think
=SUMPRODUCT((A1:A5<"")*(B1:B5<"")) Jeff wanted second column to not be blank "Mike H" wrote: Try:- =SUMPRODUCT((A1:A5<"")*(B1:B5="")) Extend A5 - B5 as required Mike "Jeff" wrote: I have two columns of data I want a total count (not sum) of the first column only if the corresponding second column is not blank -- Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"countif" and "and" condition | Excel Worksheet Functions | |||
Using "Countif" in macro gives compile error | Excel Discussion (Misc queries) | |||
I need help with a formula similar to "countif" but more complex | Excel Worksheet Functions | |||
Logic of this formula =SUMPRODUCT((A1:A4<"")/COUNTIF(A1:A4,A1:A4& | Excel Discussion (Misc queries) | |||
=countif (h3:h16"=01 01 2006") how to substitute cell for date | Excel Worksheet Functions |