highlight the row of the cell Im working in?

M

mock

I am dealing with a lot of data and I ma trying to highlight the row of the
cell I am currently working on. Any suggestions that Excel 2007 can perform
with out add-ons?
 
P

Paul

The following may work for you:


Code:
--------------------


Public oldTarget

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If oldTarget <> "" Then Range(oldTarget).EntireRow.Interior.ColorIndex = -4142
Target.EntireRow.Interior.ColorIndex = 6
oldTarget = Target.Address
End Sub
--------------------



Place that into the worksheet module for the sheet with all of your
data. The variable 'oldTarget' should be outside the Private Sub
procedure as shown.
 
T

trip_to_tokyo

EXCEL 2007

Using row 7 as an example.

Click on the number 7 to highlight the whole row.

Right click.

Format Cells . . .

Fill tab

Fill with a colour of your choice.

OK.

Work in the row and then remove the formatting once you have finished.

If my comments have helped please hit Yes.

Thanks.
 
M

Mike H

Hi,

I prefer the Rowliner addin and you can Google for that if you want but
here's a way with an addin

Right click your sheet tab, view code and paste this in

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.FormatConditions.Delete
With Target.EntireRow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
.Interior.ColorIndex = 20
End With
End With
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
×

מיכ×ל (מיקי) ×בידן

If you'll face any problems when trying to COPY/PASTE with some of the codes
- I would suggest not to color the Row but, instead, to Highlight it only .
Try the following code
 
G

Gord Dibben

Micky

Funny you should mention facing problems with copy/paste with some of the
codes.

Have you actually tried your own code?

How would you suggest copying and pasting a range of of cells when entire
rows are selected?



Gord
 
×

מיכ×ל (מיקי) ×בידן

I assume that funny is a relative term...
Did you check my code ?
1) In the VBE, copy the code to a Worksheet(!) level.
2) Click to select cell D5.
3) Type 123 and press CTRL+C.
4) Move - with an arrow key - to Cell D6 and press CTRL+V.
[In both cases the entire row, 5 and then 6 will be Highlighted as light gray]
*** What did you get ? ***
Micky
 
×

מיכ×ל (מיקי) ×בידן

....and if I may add - try it in a fresh new WB.
Micky


מיכ×ל (מיקי) ×בידן said:
I assume that funny is a relative term...
Did you check my code ?
1) In the VBE, copy the code to a Worksheet(!) level.
2) Click to select cell D5.
3) Type 123 and press CTRL+C.
4) Move - with an arrow key - to Cell D6 and press CTRL+V.
[In both cases the entire row, 5 and then 6 will be Highlighted as light gray]
*** What did you get ? ***
Micky


Gord Dibben said:
Micky

Funny you should mention facing problems with copy/paste with some of the
codes.

Have you actually tried your own code?

How would you suggest copying and pasting a range of of cells when entire
rows are selected?



Gord




.
 
G

Gord Dibben

Funny as in odd.

Yes, I checked your code.

Any cell I wish to copy brings the entire row with it.


Gord



I assume that funny is a relative term...
Did you check my code ?
1) In the VBE, copy the code to a Worksheet(!) level.
2) Click to select cell D5.
3) Type 123 and press CTRL+C.
4) Move - with an arrow key - to Cell D6 and press CTRL+V.
[In both cases the entire row, 5 and then 6 will be Highlighted as light gray]
*** What did you get ? ***
Micky


Gord Dibben said:
Micky

Funny you should mention facing problems with copy/paste with some of the
codes.

Have you actually tried your own code?

How would you suggest copying and pasting a range of of cells when entire
rows are selected?



Gord




.
 
×

מיכ×ל (מיקי) ×בידן

Well..., I never claimed it won't.
However - my code copies 3,4,... 256 cells [full row, in "2003"] while the
other codes do not.
I suppose it is easier to delete unnecessary data rather than type it.
Micky


Gord Dibben said:
Funny as in odd.

Yes, I checked your code.

Any cell I wish to copy brings the entire row with it.


Gord



I assume that funny is a relative term...
Did you check my code ?
1) In the VBE, copy the code to a Worksheet(!) level.
2) Click to select cell D5.
3) Type 123 and press CTRL+C.
4) Move - with an arrow key - to Cell D6 and press CTRL+V.
[In both cases the entire row, 5 and then 6 will be Highlighted as light gray]
*** What did you get ? ***
Micky


Gord Dibben said:
Micky

Funny you should mention facing problems with copy/paste with some of the
codes.

Have you actually tried your own code?

How would you suggest copying and pasting a range of of cells when entire
rows are selected?



Gord


If you'll face any problems when trying to COPY/PASTE with some of the codes
- I would suggest not to color the Row but, instead, to Highlight it only .
Try the following code:
------------------------------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.EntireRow.Select
Target.Activate
End Sub
---------------
Micky


:

I am dealing with a lot of data and I ma trying to highlight the row of the
cell I am currently working on. Any suggestions that Excel 2007 can perform
with out add-ons?

.

.
 
G

Gord Dibben

I guess I do not understand why you brought up the subject of copy/pasting
when OP asked for highlighting/coloring the row he was working on.

Other codes are not designed to copy/paste.


Gord

Well..., I never claimed it won't.
However - my code copies 3,4,... 256 cells [full row, in "2003"] while the
other codes do not.
I suppose it is easier to delete unnecessary data rather than type it.
Micky


Gord Dibben said:
Funny as in odd.

Yes, I checked your code.

Any cell I wish to copy brings the entire row with it.


Gord



I assume that funny is a relative term...
Did you check my code ?
1) In the VBE, copy the code to a Worksheet(!) level.
2) Click to select cell D5.
3) Type 123 and press CTRL+C.
4) Move - with an arrow key - to Cell D6 and press CTRL+V.
[In both cases the entire row, 5 and then 6 will be Highlighted as light gray]
*** What did you get ? ***
Micky


:

Micky

Funny you should mention facing problems with copy/paste with some of the
codes.

Have you actually tried your own code?

How would you suggest copying and pasting a range of of cells when entire
rows are selected?



Gord


If you'll face any problems when trying to COPY/PASTE with some of the codes
- I would suggest not to color the Row but, instead, to Highlight it only .
Try the following code:
------------------------------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.EntireRow.Select
Target.Activate
End Sub
---------------
Micky


:

I am dealing with a lot of data and I ma trying to highlight the row of the
cell I am currently working on. Any suggestions that Excel 2007 can perform
with out add-ons?

.

.
 
×

מיכ×ל (מיקי) ×בידן

....because an average Excel user would need to copy/paste from time to time -
don't you think so...
By the way, if an OP asks/mentions only the need for highlighting, the
entire row, does it prove he is willing to given up all other Build-in
"Excel" features.
Would you, or one of your acquaintances, prefer highlighting an entire row
by giving up the Copy/Paste feature !?
Frankly, I don't see any reason to keep this superfluous argument going on -
so, please consider this as my last reply in this thread...
Have a nice weekend,
Micky


Gord Dibben said:
I guess I do not understand why you brought up the subject of copy/pasting
when OP asked for highlighting/coloring the row he was working on.

Other codes are not designed to copy/paste.


Gord

Well..., I never claimed it won't.
However - my code copies 3,4,... 256 cells [full row, in "2003"] while the
other codes do not.
I suppose it is easier to delete unnecessary data rather than type it.
Micky


Gord Dibben said:
Funny as in odd.

Yes, I checked your code.

Any cell I wish to copy brings the entire row with it.


Gord



I assume that funny is a relative term...
Did you check my code ?
1) In the VBE, copy the code to a Worksheet(!) level.
2) Click to select cell D5.
3) Type 123 and press CTRL+C.
4) Move - with an arrow key - to Cell D6 and press CTRL+V.
[In both cases the entire row, 5 and then 6 will be Highlighted as light gray]
*** What did you get ? ***
Micky


:

Micky

Funny you should mention facing problems with copy/paste with some of the
codes.

Have you actually tried your own code?

How would you suggest copying and pasting a range of of cells when entire
rows are selected?



Gord


If you'll face any problems when trying to COPY/PASTE with some of the codes
- I would suggest not to color the Row but, instead, to Highlight it only .
Try the following code:
------------------------------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.EntireRow.Select
Target.Activate
End Sub
---------------
Micky


:

I am dealing with a lot of data and I ma trying to highlight the row of the
cell I am currently working on. Any suggestions that Excel 2007 can perform
with out add-ons?

.


.

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top