Consulting

Results 1 to 5 of 5

Thread: Solved: Not important, error with the ISBLANK function

  1. #1
    VBAX Contributor Daxton A.'s Avatar
    Joined
    Jun 2004
    Location
    Biloxi, Mississippi
    Posts
    143
    Location

    Question Solved: Not important, error with the ISBLANK function

    If I type =ISBLANK(G7:M14)
    the value comes up false, (G7:m14 are in fact blank by the way.)

    But if I type in the function pertaining to 1 cell it comes back true...and this is for all the cells G7 to M14. I don't get why? Can sm1 please explain this to me...

    Much appreciated,
    Daxton
    “All right now ya wise guy … Dance!”

  2. #2
    VBAX Mentor Teeroy's Avatar
    Joined
    Apr 2012
    Location
    Sydney, Australia
    Posts
    414
    Location
    As I understand it ISBLANK is designed for a single cell and will only evaluate the first cell of the range supplied. If you are checking for blanks try something like =IF(COUNTBLANK(G7:M14), TRUE, FALSE).
    _________________________________________________________________________
    "In theory there is no difference between theory and practice. In practice there is." - Chuck Reid

    Any day you learn something new is a day not wasted.

  3. #3
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    It actually depends on the input range, where the formula is located and how it is entered.
    For a normally entered formula (i.e. non-array), if the input range is a single row or column and the formula cell is directly to the side of/below exactly one of the referenced cells, then that cell will be evaluated by the ISBLANK. In all other situations (multiple rows/columns and/or no intersection with the formula cell and the range's rows/columns) the range evaluates to #VALUE and ISBLANK returns FALSE.
    For an array-entered formula entered into one cell, ISBLANK evaluates the first cell only; for an array formula in multiple cells, ISBLANK evaluates each cell in turn for as many cells as the formula occupies.

    If you want to test if all cells are blank or not, you can also use:
    =AND(ISBLANK(G7:M14))
    array-entered into one cell.

    FWIW.
    Be as you wish to seem

  4. #4
    VBAX Mentor Teeroy's Avatar
    Joined
    Apr 2012
    Location
    Sydney, Australia
    Posts
    414
    Location
    Aflatoon, thanks for the detailed explanation. I also found that a normally entered formula acts as you've described an array entry in a single cell (in excel 2003). I ignored array entry of ISBLANK as it didn't seem to provide any value over multiple single cell entries but using the AND to reduce the array to a single resultant is a great enhancement.
    _________________________________________________________________________
    "In theory there is no difference between theory and practice. In practice there is." - Chuck Reid

    Any day you learn something new is a day not wasted.

  5. #5
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    Quote Originally Posted by Teeroy
    I also found that a normally entered formula acts as you've described an array entry in a single cell (in excel 2003).
    It depends where the formula cell is, as I mentioned.
    Be as you wish to seem

Posting Permissions

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