+ Reply to Thread
Results 1 to 4 of 4

Disregarding blank cells containing invisible spaces when using array formulas

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

    Disregarding blank cells containing invisible spaces when using array formulas

    Problem:

    Columns A:B contain the number of points scored by a certain player during each quarter.
    An empty cell indicates no points were scored during that quarter.
    When using this array formula to total the points scored during the 2nd half, it returns #VALUE!.


    Solution:

    It is most likely that the blank cell in column A is actually not empty, but contains an invisible space.
    Use the ISNUMBER and IF functions, combined in the following Array Formula to disregard such cells, and thus avoiding errors:
    {=SUM(IF(ISNUMBER(A2:A5),(A2:A5)*((B2:B5=3)+(B2:B5=4))))}

    (To create Array formula: select the cell after typing the formula,press F2 and then press Ctrl+Shift+Enter)

    Example:

    Points___Quarter
    8________1
    5________2
    _________3
    2________4


  2. #2
    Registered User
    Join Date
    05-16-2005
    Posts
    33

    Disregarding blank cells containing invisible spaces when using array formulas

    Thanks for this tip. I am having trouble adapting it for use with the sumproduct function - can it be adapted so that any rows in the sumproduct array that have blanks or alphas in them are ignored?
    Also, is it necessary to use isnumber when using functions average or stdev or is excel smart enough to ignore non-numerics and adjust the total number of rows accordingly?
    Thanks
    Chris

  3. #3
    Registered User
    Join Date
    08-14-2003
    Location
    New Zealand
    Posts
    41

    Reply: random379

    Hi Chris,

    Quote Originally Posted by random379
    Thanks for this tip. I am having trouble adapting it for use with the sumproduct function - can it be adapted so that any rows in the sumproduct array that have blanks or alphas in them are ignored?
    Also, is it necessary to use isnumber when using functions average or stdev or is excel smart enough to ignore non-numerics and adjust the total number of rows accordingly?
    Thanks
    Chris
    I am not at my PC right now, so I cannot check, but if I recall correctly, the help pages on the AVERAGE function are explicit about how it treats empty cells, zeros, and alphas. Have a look and post back if it doesn't answer your problem.

    Alan.

  4. #4
    Registered User
    Join Date
    01-14-2008
    Posts
    1

    blank cells or formulas in vba

    i have a similar problem in that in vba the function "if cell is blank goto" dosen't work because it sees the formula as not a blank. the value is " " which visually is a blank but the formula makes it not a blank.

    what can i add to my code to make the function look at the result rather than the contents?

+ 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