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.
Stefan Holz - 10 Jul 2007 11:24 GMT
Hi Brian,
why don't you try
=if(sum(i,q)>0,i-q,"")
Stefan
>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
[quoted text clipped - 7 lines]
> 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.
Brian Clarke - 10 Jul 2007 11:37 GMT
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
> Hi Brian,
>
[quoted text clipped - 15 lines]
>> 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.
Stefan Holz - 10 Jul 2007 12:05 GMT
=if(sumproduct((B84:H84="")*1, (J84:P84="")*1)=8;"";I84-Q84)
should work. hope so!
Stefan
Stefan Holz - 10 Jul 2007 12:39 GMT
=if(sumproduct((B84:H84="")*1, (J84:P84="")*1)=8, "", I84-Q84)
no semicolons, use commas - sorry!
we use semicolons over here in Germany ;-)
Stefan
> =if(sumproduct((B84:H84="")*1, (J84:P84="")*1)=8;"";I84-Q84)
>
> should work. hope so!
>
> Stefan
Bob Phillips - 10 Jul 2007 12:16 GMT
=IF(AND(COUNTA(B2:H2)>0,COUNTA(J2:P2)>0),I2-Q2,"")

Signature
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
> Stefan,
>
[quoted text clipped - 24 lines]
>>> and Q, regardless of whether all the entries in B - H and J - P are
>>> blank.
Brian Clarke - 10 Jul 2007 12:38 GMT
Many thanks to all. Those answers work.
> =IF(AND(COUNTA(B2:H2)>0,COUNTA(J2:P2)>0),I2-Q2,"")
>
[quoted text clipped - 26 lines]
>>>> and Q, regardless of whether all the entries in B - H and J - P are
>>>> blank.
Dave Peterson - 10 Jul 2007 12:17 GMT
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")
> 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
[quoted text clipped - 7 lines]
> 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.

Signature
Dave Peterson