Conditional formatting using a formula Excel 2003/2007

Semanon

New Member
Joined
Dec 5, 2013
Messages
7
Hello,

I'm attempting to format cells using a formula in Excel 2007 & it just won't work for me. Simple conditional highlighting of a cell does work.
---
Probably a simple answer that's escaping me.
---
The workbook has macros if it makes any difference(bug?).

Say cell A2 has a value to compare to in cell A3 to see if they are equal (value=Yes), if so cell A1 should be yellow highlighted.

Using normal Excel 2007 (and in compatibility mode for 2003) in I tried the following formulas:

=A2=A3
=A2="Yes"
=range_name=A3
=range_name=trim(A3)
=range_name=Logical_Yes (Logical_Yes == cell A3)


None worked. :(

Any insight would be much appreciated.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
What type of values do you have in the cells?
 
Upvote 0
Select cells A1 down as far as you want the format to apply, and in Conditional Formatting Use a formula to determine which cells are formatted and use =A2=A3 as the formula and set the fill to be yellow and OK out.

That should be it.
 
Upvote 0
Cell A1 would be a time (not used in the comparison)

Cell A2 (range_name) has formula:
=IF(AND(Current_Time>(Break_1-Offset_5_Minutes),Current_Time<(Break_1+Offset_5_Minutes))*1,"Yes","No")

Cell A3 contains the text string: Yes

I would prefer to use named ranges in the conditional formatting comparison. (range_name & Logical_Yes)


Thanks
 
Upvote 0
=A2=A3 should work.

If you want to use named ranges what will those named ranges refer to?
 
Upvote 0
Maybe I don't understand what you are trying to achieve.

It doesn't matter what formulae are in the cells. I thought you were asking for A1 to be coloured yellow if A2=A3. If A2 contains a "Yes" from a formula and A3 contains the text "Yes" then A1 will be yellow.

Initially, i assumed you were trying to match cells running down in column A. Are you trying to achieve this across the worksheet so row 1 is yellow if row 2 = row 3?
 
Upvote 0
Maybe I don't understand what you are trying to achieve.

It doesn't matter what formulae are in the cells. I thought you were asking for A1 to be coloured yellow if A2=A3. If A2 contains a "Yes" from a formula and A3 contains the text "Yes" then A1 will be yellow.

Initially, i assumed you were trying to match cells running down in column A. Are you trying to achieve this across the worksheet so row 1 is yellow if row 2 = row 3?

---

Hi Grd,

yes you assumed correct. Mea culpa, it should have read A1, B1 = C1 -- as I'm comparing rows in a column.

I found the problem - absolute cell referencing was biting me! Excel was inserting =$B$2=$C$2, BUT it should have been =$B$2=C2

thanks for the help folks - problem solved.
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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