Formulas in Conditional Formatting

broncos347

Active Member
Joined
Feb 16, 2005
Messages
291
Office Version
  1. 365
Platform
  1. Windows
I have a spreadsheet with a number of columns and I am trying to us a formula in conditional formatting to turn a cell a different colour should certain criteria be met.

Basically, column B has a number and column E has a date. What I am trying to do to change the cell in B a different colour should the number in B be higher than 50, but only if there is no date in column E.

I've tried the following formula but I can't get it to work:

-IF(AND(B1>49,E1=0,""))

Can anyone help?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
You don't need the If statement, try

=AND(B1>49,E1="")

edit...or just to give you an alternative to Peter's... :cool:

=(B1>49)*(E1="")
 
Upvote 0
or here is a bit of code

Code:
Sub colourB()

For i = 1 To 65536
    If WorksheetFunction.And(Cells(i, 2) > 49, Cells(i, 5) <> 0) Then Cells(i, 2).Interior.ColorIndex = 3
Next i

End Sub
[/code]
 
Upvote 0

Forum statistics

Threads
1,211,788
Messages
6,103,981
Members
447,888
Latest member
eaydogan

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
Back
Top