1

I am trying to add a conditional format formula for cell A1. I would like to change the color to green when the offset value (2,20)=True. I can't use =$U$3=TRUE because the range will change as I copy and paste this to other tabs.

Would it be possible to input into the formula something like this?

=ActiveCell.Offset(2,20)=True

1 Answer 1

2

You can use

=OFFSET(A1,2,20)

No need for the = TRUE part.

Make sure the cell reference isn't absolute and nor is the range it is applied to.

Conditional formatting rule

Applied:

enter image description here

3
  • 1
    Perfect, thank you. That was driving me crazy, I only knew how to do that in VBA.
    – nbwest76
    Aug 19, 2018 at 18:50
  • one more thing, what if I wanted to have a requirement to only fill in the color when both cells =OFFSET(A1,2,20) AND =OFFSET(A1,2,21) as true?
    – nbwest76
    Aug 19, 2018 at 21:27
  • 1
    Never mind, I wasn't able to get it to work using the and function, but I figured it out using the following: =(OFFSET(A1,2,20))*(OFFSET(A1,2,21))
    – nbwest76
    Aug 19, 2018 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.