Counting unique items...please help

L

Lisa

I would like to create a formula that would add up a range of cells in column
B only if there is a value entered in Column Q. I've tried a couple of
things to no avail. Any suggestions???
 
D

Duke Carey

If by 'value' you mean a number, then

=SUMPRODUCT(--ISNUMBER(Q1:Q7),B1:B7)

If you mean a non-blank cell, then

=SUMPRODUCT(--NOT(ISBLANK(Q1:Q7)),B1:B7)
 
L

Lisa

I mean a non-blank cell. In a new worksheet I am summarizing data from
corresponding worksheets. I tried the second formula you suggested, but I
think it is multiplying the values b/c I get an outrageously high number.
Should I be using something different then SUMPRODUCT???
 
L

Lisa

NEVER MIND Duke - made a silly mistake - formula seems to be working great.
Thank you so much for the help!
 
L

Lisa

ACTUALLY, it's not working. I tried the following:

=SUM(--NOT(ISBLANK(Q8:q300)),F8:F300)

and the formula is calculating the sum of column F but disregarding the
condition. IOW, it's ignoring if it's a blank cell or not. Sugesstions??
 
V

vezerid

=SUMPRODUCT(--NOT(ISBLANK(Q8:q300)),F8:F300)

or

=SUM(--NOT(ISBLANK(Q8:q300))*F8:F300)

In the second case you needed to multiply. Also the second formula
needs to be array-entered (Ctrl+Shift+Enter)

HTH
Kostis Vezerides
 
L

L. Howard Kittle

Hi Lisa,

Column Q... blank or not blank???

<I would like to create a formula that would add up a range of cells in
column
<B only if there is a value entered in Column Q.

=SUM(--NOT(ISBLANK(Q1:Q7))*B1:B7)

<What I would like to do is add the sum of the values
<in column B only if there is a blank cell in column Q.

=SUM(--ISBLANK(Q1:Q7))*B1:B7

HTH
Regards,
Howard
 
Top