Conditional Formatting (IF not empty)

后端 未结 6 547
一向
一向 2021-01-04 06:06

How do I conditionally format a cell so if not blank it is grey?

I tried to do \'not equal\', but it didn\'t work.

I am using Windows Office 2003 with Wind

相关标签:
6条回答
  • 2021-01-04 06:34

    This method works for Excel 2016, and calculates on cell value, so can be used on formula arrays (i.e. it will ignore blank cells that contain a formula).

    • Highlight the range.
    • Home > Conditional Formatting > New Rule > Use a Formula.
    • Enter "=LEN(#)>0" (where '#' is the upper-left-most cell in your range).
    • Alter the formatting to suit your preference.

    Note: Len(#)>0 be altered to only select cell values above a certain length.

    Note 2: '#' must not be an absolute reference (i.e. shouldn't contain '$').

    0 讨论(0)
  • 2021-01-04 06:41

    You can use Conditional formatting with the option "Formula Is". One possible formula is

    =NOT(ISBLANK($B1))
    

    enter image description here

    Another possible formula is

    =$B1<>""
    

    enter image description here

    0 讨论(0)
  • 2021-01-04 06:45

    Does this work for you:

    enter image description here

    You find this dialog on the Home ribbon, under the Styles group, the Conditional Formatting menu, New rule....

    0 讨论(0)
  • 2021-01-04 06:49

    In Excel 2003 you should be able to create a formatting rule like:

    =A1<>"" and then drag/copy this to other cells as needed.

    If that doesn't work, try =Len(A1)>0.

    If there may be spaces in the cell which you will consider blank, then do:

    =Len(Trim(A1))>0

    Let me know if you can't get any of these to work. I have an old machine running XP and Office 2003, I can fire it up to troubleshoot if needed.

    0 讨论(0)
  • 2021-01-04 06:58

    This worked for me:

    =NOT(ISBLANK(A1))

    I wanted a box around NOT Blank cells in an entire worksheet. Use the $A1 if you want the WHOLE ROW formatted based on the A1, B1, etc result.

    Thanks!

    0 讨论(0)
  • 2021-01-04 07:00

    An equivalent result, "other things being equal", would be to format all cells grey and then use Go To Special to select the blank cells prior to removing their grey highlighting.

    0 讨论(0)
提交回复
热议问题