+ Reply to Thread
Results 1 to 2 of 2

Avoiding Errors when Using the And Function to Combine Multiple Conditions in Array Formulas

  1. #1
    John
    Guest

    Should have more documentation

    I mean, why does this work? A little more explanation is needed.

  2. #2
    Forum Contributor
    Join Date
    12-07-2004
    Posts
    596

    Avoiding Errors when Using the And Function to Combine Multiple Conditions in Array Formulas

    Problem:

    The following Array formula was designed to calculate the average difference between each pair of values in columns A & B (providing both cells are not empty):
    {=AVERAGE(IF(AND(ISNUMBER(A1:B5),ISNUMBER(A1:B5)),A1:A5-B1:B5))}
    However, an incorrect result of \"0\" is returned.

    Solution:

    Use the AVERAGE, IF, and ISNUMBER functions as shown in the following Array formula:
    {=AVERAGE(IF(ISNUMBER(A1:A5)*ISNUMBER(B1:B5),A1:A5-B1:B5))}

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1