UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Conditional Formatting Problem, Office 2013    
 
   
bazza
post Oct 10 2019, 08:11 AM
Post#1



Posts: 355
Joined: 13-February 03



Hi,

Does anyone know how I can apply conditional formatting to a cell where I can specify 3 criteria?

Heres my situation.

I need my cell J111 to go green if E110 ≥ E111 ≥ E112. Anything other than that needs to result in the cell being highlighted red.

I can do it with the formula of the cell
CODE
=IF(AND($E110>=$E111,$E111>=$E112),"P","O")
but cant get it to work on conditional formatting.

Any help greatly appreciated
This post has been edited by bazza: Oct 10 2019, 08:11 AM
Go to the top of the page
 
ADezii
post Oct 10 2019, 09:01 AM
Post#2



Posts: 2,689
Joined: 4-February 07
From: USA, Florida, Delray Beach


Personally, I do not like dealing with Conditional Formatting, so I would use the SelectionChange() Event of the Worksheet as follows:
CODE
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If (Cells(110, "E") >= Cells(111, "E")) And (Cells(111, "E") >= Cells(112, "E")) Then
    Cells(111, "J").Interior.Color = vbGreen
  Else
    Cells(111, "J").Interior.Color = vbRed
  End If
End Sub

This post has been edited by ADezii: Oct 10 2019, 09:19 AM
Go to the top of the page
 
bazza
post Oct 10 2019, 09:21 AM
Post#3



Posts: 355
Joined: 13-February 03



Thanks but it needs to be a macro free workbook unfortunately.
Go to the top of the page
 
RJD
post Oct 10 2019, 09:23 AM
Post#4


UtterAccess VIP
Posts: 10,131
Joined: 25-October 10
From: Gulf South USA


Hi: In CF, try something like this ...

=AND(($E110 >= $E111),($E111>=$E112))

Set the fill to Red normally, then Green in the CF.

HTH
Joe
Attached File(s)
Attached File  CF.zip ( 6.61K )Number of downloads: 4
 

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 
bazza
post Oct 10 2019, 09:45 AM
Post#5



Posts: 355
Joined: 13-February 03



I'll give that a go.

Thank you.
Go to the top of the page
 
RJD
post Oct 10 2019, 09:47 AM
Post#6


UtterAccess VIP
Posts: 10,131
Joined: 25-October 10
From: Gulf South USA


Let us know how this turns out, or if you need further assistance ...

Regards,
Joe

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 
PaulBrand
post Oct 10 2019, 09:50 AM
Post#7



Posts: 1,732
Joined: 4-September 02
From: Oxford UK


Or you could your existing formula with CF as in the attachment:





Attached File(s)
Attached File  Capture.JPG ( 40.68K )Number of downloads: 1
 

--------------------
Paul
Go to the top of the page
 
arnelgp
post Oct 10 2019, 10:45 AM
Post#8



Posts: 1,510
Joined: 2-April 09
From: somewhere out there...


two CF:

for green:
AND($E110>=$E111,$E111>=$E112)=True

for red
AND($E110>=$E111,$E111>=$E112)=False

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    17th November 2019 - 02:58 AM