Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Mar 2004
    Location
    North Carolina, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Row of cells has all 0's in them? (2003)

    Hey, is there an array formula that I can use to check and see if all cells in a row all contain zero's? For example, if C2: G2 all equal zero???

    Thanks.

  2. #2
    3 Star Lounger
    Join Date
    Mar 2004
    Location
    North Carolina, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Row of cells has all 0's in them? (2003)

    Hans, thanks. The 2nd formula seems to work... I can't get the first one to work even though all values were zero.

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Row of cells has all 0's in them? (2003)

    I think the first one should have been the array (confirm with ctrl-shift-enter):
    =AND(C2:G2=0)

    The array formula:
    =AND(C2:G2)=0

    will never be true. AND(C2:G2) will return either True or False and neither equals zero...

    Steve

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Row of cells has all 0's in them? (2003)

    Yes, that was an error. (I had the correct formula in my test worksheet but stupidly decided to type the formula instead of simply copying it <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>)

    I will edit my reply. Thanks!

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Row of cells has all 0's in them? (2003)

    Edited by HansV to correct error in formula - thanks Steve!

    The array formula =AND(C2:G2=0) (confirmed with Ctrl+Shift+Enter) returns TRUE if all cells in C2:G2 are zero or blank.
    The array formula =AND(C2:G2=0,ISNUMBER(C2:G2)) returns TRUE if all cells in C2:G2 contain 0.

  6. #6
    3 Star Lounger
    Join Date
    Mar 2004
    Location
    North Carolina, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Row of cells has all 0's in them? (2003)

    Thanks to all!!!!!!!

Posting Permissions

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