Highlighting row where you are

Bethiepooh

Board Regular
Joined
Jun 7, 2002
Messages
51
I am interested in finding out how I can highlight the row I am currently working in? When I move rows, I want the highlighting to move to the appropriate row. How do you do this?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Yes, similar to those, but not exactly. This worksheet has formulas all over it, both horizontally and vertically. So, that won't work. Any other suggestions?

Thanks!
 
Upvote 0
Maybe I am more ignorant than I thought....*laugh* I will play w/ it when I get home. Sorry for the ignorance. :)
 
Upvote 0
Three months later, I have time to play with this. And, I am too "Excel Ignorant" to do it. I thought I was good w/ Excel...HAHA

Can someone please explain the formula in the language of "For Dummies?"

Thanks! :)
 
Upvote 0
Hiya!

to use the following code:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim iColor As Integer
'// Amended routine found on this Web site
'// Note: Don't use IF you have Conditional
'// formating that you want to keep!

'// On error resume in case
'// user selects a range of cells
On Error Resume Next
iColor = Target.Interior.ColorIndex
'Leave On Error ON for Row offset errors

If iColor< 0 Then
    iColor = 36
Else
    iColor = iColor + 1
End If

'// Need this test incase Font color is the same
If iColor = Target.Font.ColorIndex Then iColor = iColor + 1

Cells.FormatConditions.Delete

'// Horizontal color banding
With Range("A" & Target.Row, Target.Address) 'Rows(Target.Row)
    .FormatConditions.Add Type:=2, Formula1:="TRUE"
    .FormatConditions(1).Interior.ColorIndex = iColor
End With

End Sub

-open Excel
-click Alt+F11
-this will take you to the VBA editor
-make sure the project explorer is visible by pressing Ctrl+R
-find your project on the project explorer and double click on the sheet you want doing the highlighting
-copy and paste the code above onto this sheet
-go back to Excel
-macro should work!

HTH,
Corticus
music269.gif

This message was edited by Corticus on 2002-09-13 10:59
 
Upvote 0
Has anyone written a routine which disables this highlight routine during copying and pasting?
 
Upvote 0

Forum statistics

Threads
1,215,334
Messages
6,124,323
Members
449,154
Latest member
pollardxlsm

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