Highlight vertical and horizontal rows

Collective

New Member
Joined
Aug 28, 2014
Messages
1
Could anyone tell me if there is a way of highlighting the column and rows of a selected cell?

For example making a cross on the screen with the cell selected as the center point and the cross moving with each new cell selected.

Thanks!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Could anyone tell me if there is a way of highlighting the column and rows of a selected cell?

For example making a cross on the screen with the cell selected as the center point and the cross moving with each new cell selected.

Thanks!
Can be done with VBA.
 
Upvote 0
this procedure will work however, it does clear ALL cell highlights before each use
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells.Interior.ColorIndex = xlNone
    Target.EntireColumn.Interior.ColorIndex = 6
    Target.EntireRow.Interior.ColorIndex = 6
End Sub
not sure if that's okay with you :s
 
Upvote 0
I would start by recording a macro of you selecting a cell, then select an entire row, then select an entire column. Then end the macro recording. That way you have the syntax of how you need to program the code. Then go to edit macros and change the select row code and the select column code. You can use variables to capture the column and row of the selected cell, then use those same variables to designate the select row and select column lines of code. Easy.you barely even have to write any code. The record macro does most of the work for you.
 
Upvote 0
Select the range, Conditional formatting:

=OR(row()=cell("row"),column=cell("Col")
and set a fill colour

Then right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,395
Messages
6,178,355
Members
452,841
Latest member
GenAkaman

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