[excel] Conditional Formatting (IF not empty)

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 Windows XP at work. I don't see the same feature as below:

enter image description here

What I have tried so far:

enter image description here

Edit: Figured what was wrong. In my production (actual work Excel), they were filled with white color. It wasn't my Excel file, so I was not aware of this before.

This question is related to excel excel-2003 conditional-formatting

The answer is


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!


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 '$').


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.


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.


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....


Examples related to excel

Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support Converting unix time into date-time via excel How to increment a letter N times per iteration and store in an array? 'Microsoft.ACE.OLEDB.16.0' provider is not registered on the local machine. (System.Data) How to import an Excel file into SQL Server? Copy filtered data to another sheet using VBA Better way to find last used row Could pandas use column as index? Check if a value is in an array or not with Excel VBA How to sort dates from Oldest to Newest in Excel?

Examples related to excel-2003

VBA - Run Time Error 1004 'Application Defined or Object Defined Error' Conditional Formatting (IF not empty) POI setting Cell Background to a Custom Color Excel add one hour How to show current user name in a cell? Get User Selected Range How do I auto size columns through the Excel interop objects? Excel: VLOOKUP that returns true or false? PHPExcel how to set cell value dynamically How to edit my Excel dropdown list?

Examples related to conditional-formatting

Vue.js: Conditional class style binding Conditionally formatting cells if their value equals any value of another column Format cell if cell contains date less than today Conditionally formatting if multiple cells are blank (no numerics throughout spreadsheet ) Change the color of cells in one column when they don't match cells in another column Conditional formatting based on another cell's value Conditional Formatting (IF not empty) Conditional Formatting using Excel VBA code Conditional formatting, entire row based Conditional formatting using AND() function