Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Fairly intricate array formula question.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
THOMAS CONLON - 27 Jul 2006 18:11 GMT
I have the following array formula, works correctly for me in cases where
both input values are nonblank, but i don't get the result i need if one or
the other is blank.  Here's the formula:
{=SUM((data!A11:A61-AVERAGE(data!A11:A61))*(data!B11:B61-AVERAGE(data!B11:B61)))}
[Actually if you are interested, it is the crossproduct term, the numerator
of the formula given the help file for the Excel SLOPE function].

What i want the formula to do is skip any row in which a value in range
A11:A61 OR B11:B61 is blank, and continue to return the crossproduct sum for
the rest of the rows where both values are nonblank.

Any array formula experts out there know a way to do that using array
formulas?

Thanks, tom
Bernie Deitrick - 27 Jul 2006 18:32 GMT
=SUM(IF((A11:A61<>"")*(B11:B61<>"")=1,(data!A11:A61-AVERAGE(data!A11:A61))*(data!B11:B61-AVERAGE(data!B11:B61))))

or

=SUM(IF((A11:A61<>"")*(B11:B61<>"")=1,(data!A11:A61-AVERAGE(IF((A11:A61<>"")*(B11:B61<>""),A11:A61)))*(data!B11:B61-AVERAGE(IF((A11:A61<>"")*(B11:B61<>""),B11:B61)))))

Not sure how you wanted to handle the averages....

HTH,
Bernie
MS Excel MVP

>I have the following array formula, works correctly for me in cases where both input values are
>nonblank, but i don't get the result i need if one or the other is blank.  Here's the formula:
[quoted text clipped - 9 lines]
>
> Thanks, tom
Harlan Grove - 27 Jul 2006 20:13 GMT
THOMAS CONLON wrote...
>I have the following array formula, works correctly for me in cases where
>both input values are nonblank, but i don't get the result i need if one or
>the other is blank.  Here's the formula:
>
>=SUM((data!A11:A61-AVERAGE(data!A11:A61))
>*(data!B11:B61-AVERAGE(data!B11:B61)))
...
>What i want the formula to do is skip any row in which a value in range
>A11:A61 OR B11:B61 is blank, and continue to return the crossproduct sum for
>the rest of the rows where both values are nonblank.
>
>Any array formula experts out there know a way to do that using array
>formulas?

If you mean something like

=SUM(IF(ISNUMBER(data!A11:A61)*ISNUMBER(data!B11:B61),data!A11:A61
-AVERAGE(IF(ISNUMBER(data!A11:A61)*ISNUMBER(data!B11:B61),data!A11:A61)))
*IF(ISNUMBER(data!A11:A61)*ISNUMBER(data!B11:B61),data!B11:B61
-AVERAGE(IF(ISNUMBER(data!A11:A61)*ISNUMBER(data!B11:B61),data!B11:B61))))

use the following instead.

=COVAR(data!A11:A61,data!B11:B61)
*SUMPRODUCT(ISNUMBER(data!A11:A61)*ISNUMBER(data!B11:B61))

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.