Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Excel sheet. Row number 2 contains date values in each cell. For each cell in the sheet I want to check if the value in row 2 in my column equals some cell (let's say EG67, also dates).

How can I do that?

It's supposed to be one equation that will be the same for all cells, i.e. something generic. I need to use this in conditional formatting.

share|improve this question
up vote 1 down vote accepted

Now that I understand what you are asking for:

Go to the conditional formating, select highlighting cell rules, then select Equal To.

Then select the cell that you want them to be equal to.

Pick the formatting that you want, and then OK.

Alternatively, you can get to this option from the create new rule -> Format only cells that contain -> Set it to cell value equal to ...


To make this work with relative addresses, what you have to do is manually change it (remove the dollar signs) to turn the absolute address into a relative one. The rules of this are a little tricky (see here for all the gory details) but in essence if you just want to compare if the entry in row two is equal to one above it, you would do something like (assuming these are rows one and two, and you are starting at column A, and going to Z):

  1. Create a rule for A2, for making it equal to A1 (make sure to remove the dollar signs).
  2. Edit the rule (conditional formatting -> manage rules) and set the range that it applies to to be A2:Z2.

Should be done.

share|improve this answer
OH! but i want to compare all the cells so i need a generic formula. somthing that says: "if the content in the cell in my column in row 2 equals to EG67". How do i get the content of the cell in my column in row 2? – aharon Jul 9 '12 at 16:42
It took me time to understand your answer, but eventually i understood what you ment. It worked! tanks! – aharon Jul 11 '12 at 16:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .