Highlight Active Row/Column

Shamsuddeen

Active Member
Joined
Feb 16, 2002
Messages
292
Hi Everybody,

I have a very big worksheet having 1000+ recods and I have to go thru it to find certain value using find command (****+F5).

Whenever I move thru the records, I need the active row (or both active row and column)be highlighted with a background color.


Any help is appreciated.

Regards,

Shamsuddeen
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,257
Right click on your sheet tab, left click on View Code, and paste this into the module:

Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Cells.Interior.ColorIndex = 0
Target.EntireRow.Interior.ColorIndex = 8
Target.EntireColumn.Interior.ColorIndex = 8
End Sub

It will hilite the row and column you are in, with a shade of blue. Modify for desired color index number.
 

purpleski

New Member
Joined
Sep 1, 2002
Messages
5
Nice code. I love finding things like this but it appears to make copying between cells difficult because having gone to the cell to copy from pressed ctrl-c or clicked on copy when you move to the cell to copy to the copy function is "reset". You can copy and paste by coping within the formula bar but is there anyway of preventing the copy function being reset?

Purpleski
 

Forum statistics

Threads
1,144,118
Messages
5,722,587
Members
422,447
Latest member
knopp

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
Top