Conditional Formatting and Empty Cells

falcios

Active Member
Joined
Aug 30, 2006
Messages
264
Office Version
  1. 2019
Platform
  1. Windows
I have this formula and I have applied conditional formatting
=IF(D41=D40,"Change","")

Conditional formatting is to bold and fill cell with yellow color if Change is in the cell.
When I drag the formula down to the whole range, the conditional formatting has been applied to the numbers that changed as well as empty adjacent cells.

I don't want to see the word change if the adjacent cell is empty.
How can I do this?

Thanks in advance.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

arthurbr

Well-known Member
Joined
Dec 8, 2006
Messages
2,301
Office Version
  1. 2010
You should add a condition to your formula providing for empty cells. I don't understand whet you mean by "adjacent cell" , but something based on
Excel Formula:
=IF(AND(D41=D40, D41<>"",D40<>""),"Change","")
should do?
 
Solution

falcios

Active Member
Joined
Aug 30, 2006
Messages
264
Office Version
  1. 2019
Platform
  1. Windows
You should add a condition to your formula providing for empty cells. I don't understand whet you mean by "adjacent cell" , but something based on
Excel Formula:
=IF(AND(D41=D40, D41<>"",D40<>""),"Change","")
should do?

Thanks arthurbr, that formula worked perfectly.

I meant by adjacent cells, the cell is empty either to the left or right of the cell
 

Forum statistics

Threads
1,141,613
Messages
5,707,402
Members
421,508
Latest member
Jalayne

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top