highlight row / column with conditional formatting

markstro

Board Regular
Joined
Sep 8, 2008
Messages
106
I have a workbook saved as Excel 97/2003 workbook*.xls (compatibility mode) that uses the following VBA and conditional formatting to highlight the row/column the selected cell occupies.

VBA
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) Application.ScreenUpdating = True

Conditional Formatting formula
=OR(AND(CELL("row")=ROW(),COLUMN()<=CELL("col")),AND(CELL("col")=COLUMN(),ROW()<=CELL("row")))

This combination works just fine in the 97/2003 workbook, but not another saved as *.xlsm format.

What changed between Excel 97-2003 and Excel 2007??
I run a compatibility check and get an overlapping conditional formatting problem, not sure how to fix it or if it is what is effecting my formatting to work.

I have used this formatting / code successfully on other workbooks saved as 97/2003 but have problems getting it to work in Excel 2007.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
I have verified my macros are enabled with the .xlsm workbook
Where else can I look, probably something simple I don't know about.
 
Upvote 0
From the compatibility checker results

"Some cells have overlapping conditional formatting ranges. Earlier versions of Excel will not evaluate all ot the conditional formatting rules on the overlapping cells. The overlapping cells will show different conditional formatting" Location:'Scratch Pad', Conditional Formatting

Scratch pad is the title of the worksheet
 
Upvote 0
Yes I did, all it does is move to that worksheet and show you the cells affected.

I am not sure if that problem is preventing the row/column highlighting from happening or not.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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