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

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,218,659
Messages
6,143,741
Members
450,502
Latest member
sakaria_123

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