How to Highlight active row

matts

New Member
Joined
Sep 11, 2002
Messages
41
Is there a way to highlight a row if it is the active row i.e if I click into any cell in row 2 then the whole row is lit up in yellow or some colour. In that way, I can setup a document so that when a user tabs or arrows down the page, the whole row is highlighted allowing them to easily view across the line all the relevant values.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
Hi matts:
Welcome to the Board!
You can use the following conditional formatting for the rows of interest ...

Formula Is =cell("row")=row() ... Pattern -- specify color of your choice, say 'Yellow'

This will highlite the entire row on either making an entry in any cell of that row, or using the DEL key, or using the F9 key

If you want to have the entire row highlighted simply on selection without having to make an entry in any cell, or using the DEL key, or the F9 key, you can use the following SUB to force CALC on any cell selection in the sheet:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Calculate
End Sub

You want to check whether it is desirable for you to use the SUB for the automatic calculation feature.

Regards!

Yogi
 

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
On 2002-09-15 23:06, Brian from Maui wrote:
Yogi,

I'm trying this formula, but I must be missing something...it doesn't work. :)

Hi Brian:
Step by SteP ...
1. First select the rows of interest
2. Conditional Formating ...
Formula IS =cell("row")=row() Pattern ... Color
What this says is that for any cellmselction create the Pattern for the entire row
3. then if make an entry in any cell, use the DEL key, or the F9 key, the Conditional Formating takes place.

I hope this helps.

Regards!

Yogi
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459

ADVERTISEMENT

Aloha Yogi,

Thanks Yogi, I was highlighting parts of a row. Does this work for a range in a row?
This message was edited by Brian from Maui on 2002-09-15 23:33
 

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
On 2002-09-15 23:32, Brian from Maui wrote:
Aloha Yogi,

Thanks Yogi, I was highlighting parts of a row. Does this work for a range in a row?
This message was edited by Brian from Maui on 2002-09-15 23:33

Hi Brian:

It should ... provided we can specifically define the range that should be operated on.

Regards!

Yogi
 

matts

New Member
Joined
Sep 11, 2002
Messages
41
Thankyou for the responses, that does work well but, only when I enter a value into a cell. I really need a setup where i don't have to enter a value but instead, just select an active cell by clicking into it or arrowing down. When a cell is selected in the range the row should highlight.
 

matts

New Member
Joined
Sep 11, 2002
Messages
41
Hello NateO

That is exactly what I needed. Thankyou for the solution.

matts
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,505
Messages
5,832,117
Members
430,111
Latest member
Francis Xavier

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