Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 130
Default automaticely highlight the row that I am working on

Is there any function for me to set up color change for the row that I am
working on, so, I won't mistype row for my worksheet?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default automaticely highlight the row that I am working on

There are methods using sheetchange events but the easiest method is to use
Chip Pearson's RowLiner add-in.

http://www.cpearson.com/excel/RowLiner.htm

Just a note...........Rowliner won't work on protected sheets.

If your sheet is protected you need event code pasted into the sheet module.

Right-click on the sheet tab and "View Code" Paste into that module.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
ActiveSheet.Unprotect Password:="justme"
If Not OldCell Is Nothing Then
With OldCell.EntireRow
.Interior.ColorIndex = xlColorIndexNone
.Borders.LineStyle = xlLineStyleNone
End With
End If
Set OldCell = Target
With OldCell.EntireRow
.Interior.ColorIndex = 6
.EntireRow.Borders.LineStyle = xlContinuous
End With
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
ActiveSheet.Protect Password:="justme"
End Sub

Will color the active row yellow.

Note: will wipe out existing background color of activecell cell unless BG
color is due to CF



Gord Dibben MS Excel MVP

On Fri, 5 Feb 2010 16:29:01 -0800, Cindy
wrote:

Is there any function for me to set up color change for the row that I am
working on, so, I won't mistype row for my worksheet?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default automaticely highlight the row that I am working on

And just for fun, if you do not want to do all 256 columns of the row you
selected, you could give this a try:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Data As Range
Dim i As Integer
Dim j As Integer
Dim k As Integer
i = 2
j = 8
k = ActiveCell.Column()
Set Data = Range("B8:K22")

Data.Interior.ColorIndex = xlNone

If ActiveCell.Row < 8 Or ActiveCell.Row 22 Or _
ActiveCell.Column < 2 Or ActiveCell.Column 11 Then
Exit Sub
End If

ActiveCell.Offset(0, -(k - i)). _
Resize(1, 10).Interior.ColorIndex = 35 'try 26 it's is pretty wild!!!

End Sub

Where this will highlight the row of the cell selected in the named range
Data which is Range(B8:K22). Of course the code would need to be tweeked to
suit your sheet operational range. If you have other parts of the sheet
with colored cells OUTSIDE the Data range then these will remain intact.
Chips code does not allow this but I believe there is code out there that
will retain the current formatting and still highlight your selected row and
return all the formatting when you reselect a cell. That is above my
paygrade and Chip and other MVP's can help you if that is needed.

Now with Chip Pearson's code if you select more that one cell in the column
then it will highlight all rows selected. That could be "gooder" if you
wanted several rows highlighted as your data may relate to stuff above and
below your primary row.

HTH
Regards
Howard

"Cindy" wrote in message
...
Is there any function for me to set up color change for the row that I am
working on, so, I won't mistype row for my worksheet?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default automaticely highlight the row that I am working on

Whoa, I have confused Chips code with that of Gords! And I believe most of
what I said about Chips code is false.

Would be fair to disregard my post but you may try the code I offered for a
limited range of row highlighting.

Sorry, really got ahead of myself here folks.

Regards,
Howard

"Cindy" wrote in message
...
Is there any function for me to set up color change for the row that I am
working on, so, I won't mistype row for my worksheet?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Highlighting a row

Hi what does the CF mean in the following sentence:

"will wipe out existing background color of active cell unless BG color is due to CF" Is it Conditional Formating?

I used the event code, but then al my background colours and lines changes to white. I do I stop that from happening?

I created a program for our school for the marks of each term and that is linked to a final report. The teachers are going to enter their marks. I protected my worksheet so that they wont be able to delete my formula's. Not everyone is on the same level with computer skills and highlighting the row will help them a lot when they enter the marks.

Thanks






Gord Dibben wrote:

There are methods using sheetchange events but the easiest method is to
05-Feb-10

There are methods using sheetchange events but the easiest method is to use
Chip Pearson's RowLiner add-in.

http://www.cpearson.com/excel/RowLiner.htm

Just a note...........Rowliner will not work on protected sheets.

If your sheet is protected you need event code pasted into the sheet module.

Right-click on the sheet tab and "View Code" Paste into that module.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
ActiveSheet.Unprotect Password:="justme"
If Not OldCell Is Nothing Then
With OldCell.EntireRow
..Interior.ColorIndex = xlColorIndexNone
..Borders.LineStyle = xlLineStyleNone
End With
End If
Set OldCell = Target
With OldCell.EntireRow
..Interior.ColorIndex = 6
..EntireRow.Borders.LineStyle = xlContinuous
End With
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
ActiveSheet.Protect Password:="justme"
End Sub

Will color the active row yellow.

Note: will wipe out existing background color of activecell cell unless BG
color is due to CF



Gord Dibben MS Excel MVP

wrote:

Previous Posts In This Thread:

On Friday, February 05, 2010 7:29 PM
Cindy wrote:

automaticely highlight the row that I am working on
Is there any function for me to set up color change for the row that I am
working on, so, I will not mistype row for my worksheet?

On Friday, February 05, 2010 8:00 PM
Gord Dibben wrote:

There are methods using sheetchange events but the easiest method is to
There are methods using sheetchange events but the easiest method is to use
Chip Pearson's RowLiner add-in.

http://www.cpearson.com/excel/RowLiner.htm

Just a note...........Rowliner will not work on protected sheets.

If your sheet is protected you need event code pasted into the sheet module.

Right-click on the sheet tab and "View Code" Paste into that module.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
ActiveSheet.Unprotect Password:="justme"
If Not OldCell Is Nothing Then
With OldCell.EntireRow
..Interior.ColorIndex = xlColorIndexNone
..Borders.LineStyle = xlLineStyleNone
End With
End If
Set OldCell = Target
With OldCell.EntireRow
..Interior.ColorIndex = 6
..EntireRow.Borders.LineStyle = xlContinuous
End With
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
ActiveSheet.Protect Password:="justme"
End Sub

Will color the active row yellow.

Note: will wipe out existing background color of activecell cell unless BG
color is due to CF



Gord Dibben MS Excel MVP

wrote:

On Friday, February 05, 2010 10:16 PM
L. Howard Kittle wrote:

And just for fun, if you do not want to do all 256 columns of the row
And just for fun, if you do not want to do all 256 columns of the row you
selected, you could give this a try:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Data As Range
Dim i As Integer
Dim j As Integer
Dim k As Integer
i = 2
j = 8
k = ActiveCell.Column()
Set Data = Range("B8:K22")

Data.Interior.ColorIndex = xlNone

If ActiveCell.Row < 8 Or ActiveCell.Row 22 Or _
ActiveCell.Column < 2 Or ActiveCell.Column 11 Then
Exit Sub
End If

ActiveCell.Offset(0, -(k - i)). _
Resize(1, 10).Interior.ColorIndex = 35 'try 26 it is is pretty wild!!!

End Sub

Where this will highlight the row of the cell selected in the named range
Data which is Range(B8:K22). Of course the code would need to be tweeked to
suit your sheet operational range. If you have other parts of the sheet
with colored cells OUTSIDE the Data range then these will remain intact.
Chips code does not allow this but I believe there is code out there that
will retain the current formatting and still highlight your selected row and
return all the formatting when you reselect a cell. That is above my
paygrade and Chip and other MVP's can help you if that is needed.

Now with Chip Pearson's code if you select more that one cell in the column
then it will highlight all rows selected. That could be "gooder" if you
wanted several rows highlighted as your data may relate to stuff above and
below your primary row.

HTH
Regards
Howard

On Friday, February 05, 2010 11:20 PM
L. Howard Kittle wrote:

Whoa, I have confused Chips code with that of Gords!
Whoa, I have confused Chips code with that of Gords! And I believe most of
what I said about Chips code is false.

Would be fair to disregard my post but you may try the code I offered for a
limited range of row highlighting.

Sorry, really got ahead of myself here folks.

Regards,
Howard


Submitted via EggHeadCafe - Software Developer Portal of Choice
A Framework to Animate WPF and Silverlight Pages Similar to the PowerPoint Slides
http://www.eggheadcafe.com/tutorials...nimate-wp.aspx


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default Highlighting a row

Correct, it refers to conditional formatting. What it's trying to say
(somewhat poorly) is that the script will change the background formatting
of the cell. However, CF formatting is a different property, and so cells
that are currently colored due to active CFs, will remain that color.

--
Best Regards,

Luke M
<Eurika Stemmet wrote in message
...
Hi what does the CF mean in the following sentence:

"will wipe out existing background color of active cell unless BG color is
due to CF" Is it Conditional Formating?

I used the event code, but then al my background colours and lines changes
to white. I do I stop that from happening?

I created a program for our school for the marks of each term and that is
linked to a final report. The teachers are going to enter their marks. I
protected my worksheet so that they wont be able to delete my formula's.
Not everyone is on the same level with computer skills and highlighting
the row will help them a lot when they enter the marks.

Thanks






Gord Dibben wrote:

There are methods using sheetchange events but the easiest method is to
05-Feb-10

There are methods using sheetchange events but the easiest method is to
use
Chip Pearson's RowLiner add-in.

http://www.cpearson.com/excel/RowLiner.htm

Just a note...........Rowliner will not work on protected sheets.

If your sheet is protected you need event code pasted into the sheet
module.

Right-click on the sheet tab and "View Code" Paste into that module.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
ActiveSheet.Unprotect Password:="justme"
If Not OldCell Is Nothing Then
With OldCell.EntireRow
.Interior.ColorIndex = xlColorIndexNone
.Borders.LineStyle = xlLineStyleNone
End With
End If
Set OldCell = Target
With OldCell.EntireRow
.Interior.ColorIndex = 6
.EntireRow.Borders.LineStyle = xlContinuous
End With
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
ActiveSheet.Protect Password:="justme"
End Sub

Will color the active row yellow.

Note: will wipe out existing background color of activecell cell unless
BG
color is due to CF



Gord Dibben MS Excel MVP

wrote:

Previous Posts In This Thread:

On Friday, February 05, 2010 7:29 PM
Cindy wrote:

automaticely highlight the row that I am working on
Is there any function for me to set up color change for the row that I am
working on, so, I will not mistype row for my worksheet?

On Friday, February 05, 2010 8:00 PM
Gord Dibben wrote:

There are methods using sheetchange events but the easiest method is to
There are methods using sheetchange events but the easiest method is to
use
Chip Pearson's RowLiner add-in.

http://www.cpearson.com/excel/RowLiner.htm

Just a note...........Rowliner will not work on protected sheets.

If your sheet is protected you need event code pasted into the sheet
module.

Right-click on the sheet tab and "View Code" Paste into that module.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
ActiveSheet.Unprotect Password:="justme"
If Not OldCell Is Nothing Then
With OldCell.EntireRow
.Interior.ColorIndex = xlColorIndexNone
.Borders.LineStyle = xlLineStyleNone
End With
End If
Set OldCell = Target
With OldCell.EntireRow
.Interior.ColorIndex = 6
.EntireRow.Borders.LineStyle = xlContinuous
End With
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
ActiveSheet.Protect Password:="justme"
End Sub

Will color the active row yellow.

Note: will wipe out existing background color of activecell cell unless
BG
color is due to CF



Gord Dibben MS Excel MVP

wrote:

On Friday, February 05, 2010 10:16 PM
L. Howard Kittle wrote:

And just for fun, if you do not want to do all 256 columns of the row
And just for fun, if you do not want to do all 256 columns of the row you
selected, you could give this a try:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Data As Range
Dim i As Integer
Dim j As Integer
Dim k As Integer
i = 2
j = 8
k = ActiveCell.Column()
Set Data = Range("B8:K22")

Data.Interior.ColorIndex = xlNone

If ActiveCell.Row < 8 Or ActiveCell.Row 22 Or _
ActiveCell.Column < 2 Or ActiveCell.Column 11 Then
Exit Sub
End If

ActiveCell.Offset(0, -(k - i)). _
Resize(1, 10).Interior.ColorIndex = 35 'try 26 it is is pretty wild!!!

End Sub

Where this will highlight the row of the cell selected in the named range
Data which is Range(B8:K22). Of course the code would need to be tweeked
to
suit your sheet operational range. If you have other parts of the sheet
with colored cells OUTSIDE the Data range then these will remain intact.
Chips code does not allow this but I believe there is code out there that
will retain the current formatting and still highlight your selected row
and
return all the formatting when you reselect a cell. That is above my
paygrade and Chip and other MVP's can help you if that is needed.

Now with Chip Pearson's code if you select more that one cell in the
column
then it will highlight all rows selected. That could be "gooder" if you
wanted several rows highlighted as your data may relate to stuff above and
below your primary row.

HTH
Regards
Howard

On Friday, February 05, 2010 11:20 PM
L. Howard Kittle wrote:

Whoa, I have confused Chips code with that of Gords!
Whoa, I have confused Chips code with that of Gords! And I believe most
of
what I said about Chips code is false.

Would be fair to disregard my post but you may try the code I offered for
a
limited range of row highlighting.

Sorry, really got ahead of myself here folks.

Regards,
Howard


Submitted via EggHeadCafe - Software Developer Portal of Choice
A Framework to Animate WPF and Silverlight Pages Similar to the PowerPoint
Slides
http://www.eggheadcafe.com/tutorials...nimate-wp.aspx



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AUTO HIGHLIGHT ONLY ROW WORKING IN Tracy Excel Worksheet Functions 2 April 8th 09 08:31 PM
Highlight line working on. Brian Wenstrup Excel Discussion (Misc queries) 8 December 11th 07 03:57 PM
In Excel can I automatically highlight the row im working on? JPAP Excel Discussion (Misc queries) 2 September 29th 06 12:53 PM
HIGHLIGHT THE ROW I'M WORKING IN Outer Office Excel Discussion (Misc queries) 1 September 14th 06 01:24 AM
How can I highlight the cell I'm working in? TooMuchWorkInHR Setting up and Configuration of Excel 3 January 14th 06 02:45 AM


All times are GMT +1. The time now is 04:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"