Conditional Formating Question

I'm not sure if what I am trying to do is possible or not. If it is I can't seem to figure out how to do it. Basically what I am trying to do is if H1 contains an "x" AND there is any text at all in A1 I want the H1 to highlight green. If there is no x in H1 and there is any text in A1 I want the H1 to highlight red. I've already used conditional formatting to highlight green when there is an X the problem is I would like to be able to highlight red if there is no x without it highlighting the entire column even if there is no text in A. Thank you in advance for any advice or assistance you can offer.

I figured out a way to do

I figured out a way to do what I need to do. I've created two conditional formatting rules. One to highlight H1 in green if it contains "X" the other was to highlight red. Here is the formula I ended up using just in case anyone ever has to do this for one reason or another. =IF(A1>H1,TRUE,FALSE)
It may not be pretty and may not be the correct way to do this, but it does what I need it to do so I'm happy. Thank you.