SUMPRODUCT problem

B

Brian Clarke

I have a list where columns B - H are totaled in column I, and columns J - P
totaled in column Q. In column R, I want to show the difference between I
and Q, but only if there is at least one entry in cols B - H, AND at least
one entry in cols J - P.

I worked out this, which ought to work but doesn't.

=SUMPRODUCT((SUM(J84:p84="")<7)*(SUM(B84:H84="")<7)*(I84-Q84))

Where am I going wrong? This formula returns the difference between I and Q,
regardless of whether all the entries in B - H and J - P are blank.
 
B

Brian Clarke

Stefan,

Thanks for your reply. I should have explained that if there is anything at
all (even a zero) in columns B - H or J - P, I want the difference between I
and Q to appear to in column R.

Brian
 
S

Stefan Holz

=if(sumproduct((B84:H84="")*1, (J84:p84="")*1)=8;"";I84-Q84)

should work. hope so!

Stefan
 
B

Bob Phillips

=IF(AND(COUNTA(B2:H2)>0,COUNTA(J2:p2)>0),I2-Q2,"")

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
D

Dave Peterson

Maybe checking those ranges using =count() or =counta().

To check for numeric entries:
=if(and(count(b84:h84)>0,count(j84:p84)>0),i84-q84,"no entries")

to check for any entries:
=if(and(counta(b84:h84)>0,counta(j84:p84)>0),i84-q84,"no entries")
 
B

Brian Clarke

Many thanks to all. Those answers work.


Bob Phillips said:
=IF(AND(COUNTA(B2:H2)>0,COUNTA(J2:p2)>0),I2-Q2,"")

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)
 
S

Stefan Holz

=if(sumproduct((B84:H84="")*1, (J84:p84="")*1)=8, "", I84-Q84)
no semicolons, use commas - sorry!
we use semicolons over here in Germany ;-)
Stefan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Scrabble Value calculation for Welsh words 0
Sumproduct 3
Combine words from columns 17
If SUMPRODUCT & Blank cells 7
If Multiple Criteria 1
Excel Countifs/Sumproduct with mutil Or statement 3
Modify range in VBA 9
SUM - IF - AND 7

Top