+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting: Distinguish between zeros and blanks

  1. #1
    Forum Contributor
    Join Date
    02-25-2008
    Location
    Windsor, ON Canada
    MS-Off Ver
    Excel 2007, 2003
    Posts
    119

    Conditional Formatting: Distinguish between zeros and blanks

    I have four columns of numbers.

    Sometimes the numbers are > 0. . . sometimes they are all zeros. . . and sometimes they are blanks.

    I want the conditional formatting of any one row to pick up on when all four cells have zeros, but ignore when they're blanks.

    Any suggestions? When I use sum(A1:D1)=0 it also returns a true value for blanks.
    Last edited by 2709236; 12-04-2012 at 01:18 PM.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Conditional Formatting: Distinguish between zeros and blanks

    Maybe AND(SUM(A1:D1)=0, NOT(ISBLANK(A1:D1))) ?

  3. #3
    Forum Contributor
    Join Date
    02-25-2008
    Location
    Windsor, ON Canada
    MS-Off Ver
    Excel 2007, 2003
    Posts
    119

    Re: Conditional Formatting: Distinguish between zeros and blanks

    Isblank is returning a false value on my blank cells? Is something I've done throwing it off? They look pretty blank to me. . .

  4. #4
    Forum Contributor
    Join Date
    02-25-2008
    Location
    Windsor, ON Canada
    MS-Off Ver
    Excel 2007, 2003
    Posts
    119

    Re: Conditional Formatting: Distinguish between zeros and blanks

    It appears as though the isblank function can only point to one cell and not a range. It worked when I only tested one cell.

    That solves my issue. Thank you!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Conditional Formatting: Distinguish between zeros and blanks

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645
    There is a COUNTBLANK function.
    If posting code please use code tags, see here.

+ 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