![]() |
Having an entire row highlighted as I move from cell to cell
I am entering and analyzing data within an excel spreadsheet. Sometimes, due
to the size of the document I have trouble determining what row I am looking at. Is there a way to have the row highlighted while I move from cell to cell. Ex: I am in cell R12 - entire Row 12 is highlighted, then i move to cell R13 and Row 13 becomes highlighted. |
Having an entire row highlighted as I move from cell to cell
Luthdawg,
Here is a code that I googled, it seems to work just fine, however, it will remove all background coloring as it works. It will leave borders, just the fill will be removed. Place this into your VBA Editor (Alt+F11) into the ThisWorkbook Module. I would recommend that you test this on a backup copy before you implement the changes. Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'right click the tab of the sheet you are working in 'and select view code 'paste this code into the sheet 'repeat for mutiple sheets 'this works but existing color formats are lost Static LastChange Application.ScreenUpdating = False If LastChange = Empty Then LastChange = ActiveCell.Address End If Range(LastChange).EntireColumn.Interior.ColorIndex = xlNone Range(LastChange).EntireRow.Interior.ColorIndex = xlNone ActiveCell.EntireColumn.Interior.ColorIndex = 15 ActiveCell.EntireRow.Interior.ColorIndex = 15 LastChange = ActiveCell.Address Application.ScreenUpdating = True End Sub Source:http://www.mrexcel.com/archive/VBA/26758.html -- --Thomas [PBD] Working hard to make working easy. "Luthdawg" wrote: I am entering and analyzing data within an excel spreadsheet. Sometimes, due to the size of the document I have trouble determining what row I am looking at. Is there a way to have the row highlighted while I move from cell to cell. Ex: I am in cell R12 - entire Row 12 is highlighted, then i move to cell R13 and Row 13 becomes highlighted. |
Having an entire row highlighted as I move from cell to cell
You can always look at the ADDRESS BOX on the top left of the Window to see which cell you are currently in... "Thomas [PBD]" wrote: Luthdawg, Here is a code that I googled, it seems to work just fine, however, it will remove all background coloring as it works. It will leave borders, just the fill will be removed. Place this into your VBA Editor (Alt+F11) into the ThisWorkbook Module. I would recommend that you test this on a backup copy before you implement the changes. Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'right click the tab of the sheet you are working in 'and select view code 'paste this code into the sheet 'repeat for mutiple sheets 'this works but existing color formats are lost Static LastChange Application.ScreenUpdating = False If LastChange = Empty Then LastChange = ActiveCell.Address End If Range(LastChange).EntireColumn.Interior.ColorIndex = xlNone Range(LastChange).EntireRow.Interior.ColorIndex = xlNone ActiveCell.EntireColumn.Interior.ColorIndex = 15 ActiveCell.EntireRow.Interior.ColorIndex = 15 LastChange = ActiveCell.Address Application.ScreenUpdating = True End Sub Source:http://www.mrexcel.com/archive/VBA/26758.html -- --Thomas [PBD] Working hard to make working easy. "Luthdawg" wrote: I am entering and analyzing data within an excel spreadsheet. Sometimes, due to the size of the document I have trouble determining what row I am looking at. Is there a way to have the row highlighted while I move from cell to cell. Ex: I am in cell R12 - entire Row 12 is highlighted, then i move to cell R13 and Row 13 becomes highlighted. |
Having an entire row highlighted as I move from cell to cell
Another way is to use the macro at
http://www.cpearson.com/Excel/excelM...ightActiveCell "Sheeloo" wrote: You can always look at the ADDRESS BOX on the top left of the Window to see which cell you are currently in... "Thomas [PBD]" wrote: Luthdawg, Here is a code that I googled, it seems to work just fine, however, it will remove all background coloring as it works. It will leave borders, just the fill will be removed. Place this into your VBA Editor (Alt+F11) into the ThisWorkbook Module. I would recommend that you test this on a backup copy before you implement the changes. Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'right click the tab of the sheet you are working in 'and select view code 'paste this code into the sheet 'repeat for mutiple sheets 'this works but existing color formats are lost Static LastChange Application.ScreenUpdating = False If LastChange = Empty Then LastChange = ActiveCell.Address End If Range(LastChange).EntireColumn.Interior.ColorIndex = xlNone Range(LastChange).EntireRow.Interior.ColorIndex = xlNone ActiveCell.EntireColumn.Interior.ColorIndex = 15 ActiveCell.EntireRow.Interior.ColorIndex = 15 LastChange = ActiveCell.Address Application.ScreenUpdating = True End Sub Source:http://www.mrexcel.com/archive/VBA/26758.html -- --Thomas [PBD] Working hard to make working easy. "Luthdawg" wrote: I am entering and analyzing data within an excel spreadsheet. Sometimes, due to the size of the document I have trouble determining what row I am looking at. Is there a way to have the row highlighted while I move from cell to cell. Ex: I am in cell R12 - entire Row 12 is highlighted, then i move to cell R13 and Row 13 becomes highlighted. |
Having an entire row highlighted as I move from cell to cell
Sheelo,
This is a great code (I might actually use it for some things), but I think he didnt want to highlight that cell, but the row itself. If needed, we can amend the code to not highlight the Column. -- --Thomas [PBD] Working hard to make working easy. "Sheeloo" wrote: Another way is to use the macro at http://www.cpearson.com/Excel/excelM...ightActiveCell "Sheeloo" wrote: You can always look at the ADDRESS BOX on the top left of the Window to see which cell you are currently in... "Thomas [PBD]" wrote: Luthdawg, Here is a code that I googled, it seems to work just fine, however, it will remove all background coloring as it works. It will leave borders, just the fill will be removed. Place this into your VBA Editor (Alt+F11) into the ThisWorkbook Module. I would recommend that you test this on a backup copy before you implement the changes. Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'right click the tab of the sheet you are working in 'and select view code 'paste this code into the sheet 'repeat for mutiple sheets 'this works but existing color formats are lost Static LastChange Application.ScreenUpdating = False If LastChange = Empty Then LastChange = ActiveCell.Address End If Range(LastChange).EntireColumn.Interior.ColorIndex = xlNone Range(LastChange).EntireRow.Interior.ColorIndex = xlNone ActiveCell.EntireColumn.Interior.ColorIndex = 15 ActiveCell.EntireRow.Interior.ColorIndex = 15 LastChange = ActiveCell.Address Application.ScreenUpdating = True End Sub Source:http://www.mrexcel.com/archive/VBA/26758.html -- --Thomas [PBD] Working hard to make working easy. "Luthdawg" wrote: I am entering and analyzing data within an excel spreadsheet. Sometimes, due to the size of the document I have trouble determining what row I am looking at. Is there a way to have the row highlighted while I move from cell to cell. Ex: I am in cell R12 - entire Row 12 is highlighted, then i move to cell R13 and Row 13 becomes highlighted. |
Having an entire row highlighted as I move from cell to cell
Actually the rowliner link at the bottom of that link looks awesome. I'm
trying it out right now. "Thomas [PBD]" wrote: Sheelo, This is a great code (I might actually use it for some things), but I think he didnt want to highlight that cell, but the row itself. If needed, we can amend the code to not highlight the Column. -- --Thomas [PBD] Working hard to make working easy. "Sheeloo" wrote: Another way is to use the macro at http://www.cpearson.com/Excel/excelM...ightActiveCell "Sheeloo" wrote: You can always look at the ADDRESS BOX on the top left of the Window to see which cell you are currently in... "Thomas [PBD]" wrote: Luthdawg, Here is a code that I googled, it seems to work just fine, however, it will remove all background coloring as it works. It will leave borders, just the fill will be removed. Place this into your VBA Editor (Alt+F11) into the ThisWorkbook Module. I would recommend that you test this on a backup copy before you implement the changes. Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'right click the tab of the sheet you are working in 'and select view code 'paste this code into the sheet 'repeat for mutiple sheets 'this works but existing color formats are lost Static LastChange Application.ScreenUpdating = False If LastChange = Empty Then LastChange = ActiveCell.Address End If Range(LastChange).EntireColumn.Interior.ColorIndex = xlNone Range(LastChange).EntireRow.Interior.ColorIndex = xlNone ActiveCell.EntireColumn.Interior.ColorIndex = 15 ActiveCell.EntireRow.Interior.ColorIndex = 15 LastChange = ActiveCell.Address Application.ScreenUpdating = True End Sub Source:http://www.mrexcel.com/archive/VBA/26758.html -- --Thomas [PBD] Working hard to make working easy. "Luthdawg" wrote: I am entering and analyzing data within an excel spreadsheet. Sometimes, due to the size of the document I have trouble determining what row I am looking at. Is there a way to have the row highlighted while I move from cell to cell. Ex: I am in cell R12 - entire Row 12 is highlighted, then i move to cell R13 and Row 13 becomes highlighted. |
Having an entire row highlighted as I move from cell to cell
My hats off to Chip Pearson... his site is full of great ideas and written in
a very minimalist and clear way... Can you update the code required by this post as I have to leave for work now... "Luthdawg" wrote: Actually the rowliner link at the bottom of that link looks awesome. I'm trying it out right now. "Thomas [PBD]" wrote: Sheelo, This is a great code (I might actually use it for some things), but I think he didnt want to highlight that cell, but the row itself. If needed, we can amend the code to not highlight the Column. -- --Thomas [PBD] Working hard to make working easy. "Sheeloo" wrote: Another way is to use the macro at http://www.cpearson.com/Excel/excelM...ightActiveCell "Sheeloo" wrote: You can always look at the ADDRESS BOX on the top left of the Window to see which cell you are currently in... "Thomas [PBD]" wrote: Luthdawg, Here is a code that I googled, it seems to work just fine, however, it will remove all background coloring as it works. It will leave borders, just the fill will be removed. Place this into your VBA Editor (Alt+F11) into the ThisWorkbook Module. I would recommend that you test this on a backup copy before you implement the changes. Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'right click the tab of the sheet you are working in 'and select view code 'paste this code into the sheet 'repeat for mutiple sheets 'this works but existing color formats are lost Static LastChange Application.ScreenUpdating = False If LastChange = Empty Then LastChange = ActiveCell.Address End If Range(LastChange).EntireColumn.Interior.ColorIndex = xlNone Range(LastChange).EntireRow.Interior.ColorIndex = xlNone ActiveCell.EntireColumn.Interior.ColorIndex = 15 ActiveCell.EntireRow.Interior.ColorIndex = 15 LastChange = ActiveCell.Address Application.ScreenUpdating = True End Sub Source:http://www.mrexcel.com/archive/VBA/26758.html -- --Thomas [PBD] Working hard to make working easy. "Luthdawg" wrote: I am entering and analyzing data within an excel spreadsheet. Sometimes, due to the size of the document I have trouble determining what row I am looking at. Is there a way to have the row highlighted while I move from cell to cell. Ex: I am in cell R12 - entire Row 12 is highlighted, then i move to cell R13 and Row 13 becomes highlighted. |
Having an entire row highlighted as I move from cell to cell
Code to highlight the entire row, but remove fill:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'right click the tab of the sheet you are working in 'and select view code 'paste this code into the sheet 'repeat for mutiple sheets 'this works but existing color formats are lost Static LastChange Application.ScreenUpdating = False If LastChange = Empty Then LastChange = ActiveCell.Address End If Range(LastChange).EntireRow.Interior.ColorIndex = xlNone ActiveCell.EntireRow.Interior.ColorIndex = 15 LastChange = ActiveCell.Address Application.ScreenUpdating = True End Sub Chip Pearson's highlight cell: Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range) Static OldRange As Range On Error Resume Next Target.Interior.ColorIndex = 6 ' yellow - change as needed OldRange.Interior.ColorIndex = xlColorIndexNone Set OldRange = Target End Sub -- --Thomas [PBD] Working hard to make working easy. "Sheeloo" wrote: My hats off to Chip Pearson... his site is full of great ideas and written in a very minimalist and clear way... Can you update the code required by this post as I have to leave for work now... "Luthdawg" wrote: Actually the rowliner link at the bottom of that link looks awesome. I'm trying it out right now. "Thomas [PBD]" wrote: Sheelo, This is a great code (I might actually use it for some things), but I think he didnt want to highlight that cell, but the row itself. If needed, we can amend the code to not highlight the Column. -- --Thomas [PBD] Working hard to make working easy. "Sheeloo" wrote: Another way is to use the macro at http://www.cpearson.com/Excel/excelM...ightActiveCell "Sheeloo" wrote: You can always look at the ADDRESS BOX on the top left of the Window to see which cell you are currently in... "Thomas [PBD]" wrote: Luthdawg, Here is a code that I googled, it seems to work just fine, however, it will remove all background coloring as it works. It will leave borders, just the fill will be removed. Place this into your VBA Editor (Alt+F11) into the ThisWorkbook Module. I would recommend that you test this on a backup copy before you implement the changes. Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'right click the tab of the sheet you are working in 'and select view code 'paste this code into the sheet 'repeat for mutiple sheets 'this works but existing color formats are lost Static LastChange Application.ScreenUpdating = False If LastChange = Empty Then LastChange = ActiveCell.Address End If Range(LastChange).EntireColumn.Interior.ColorIndex = xlNone Range(LastChange).EntireRow.Interior.ColorIndex = xlNone ActiveCell.EntireColumn.Interior.ColorIndex = 15 ActiveCell.EntireRow.Interior.ColorIndex = 15 LastChange = ActiveCell.Address Application.ScreenUpdating = True End Sub Source:http://www.mrexcel.com/archive/VBA/26758.html -- --Thomas [PBD] Working hard to make working easy. "Luthdawg" wrote: I am entering and analyzing data within an excel spreadsheet. Sometimes, due to the size of the document I have trouble determining what row I am looking at. Is there a way to have the row highlighted while I move from cell to cell. Ex: I am in cell R12 - entire Row 12 is highlighted, then i move to cell R13 and Row 13 becomes highlighted. |
Having an entire row highlighted as I move from cell to cell
Everything works fine. Thanks so much for your help.
"Sheeloo" wrote: My hats off to Chip Pearson... his site is full of great ideas and written in a very minimalist and clear way... Can you update the code required by this post as I have to leave for work now... "Luthdawg" wrote: Actually the rowliner link at the bottom of that link looks awesome. I'm trying it out right now. "Thomas [PBD]" wrote: Sheelo, This is a great code (I might actually use it for some things), but I think he didnt want to highlight that cell, but the row itself. If needed, we can amend the code to not highlight the Column. -- --Thomas [PBD] Working hard to make working easy. "Sheeloo" wrote: Another way is to use the macro at http://www.cpearson.com/Excel/excelM...ightActiveCell "Sheeloo" wrote: You can always look at the ADDRESS BOX on the top left of the Window to see which cell you are currently in... "Thomas [PBD]" wrote: Luthdawg, Here is a code that I googled, it seems to work just fine, however, it will remove all background coloring as it works. It will leave borders, just the fill will be removed. Place this into your VBA Editor (Alt+F11) into the ThisWorkbook Module. I would recommend that you test this on a backup copy before you implement the changes. Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'right click the tab of the sheet you are working in 'and select view code 'paste this code into the sheet 'repeat for mutiple sheets 'this works but existing color formats are lost Static LastChange Application.ScreenUpdating = False If LastChange = Empty Then LastChange = ActiveCell.Address End If Range(LastChange).EntireColumn.Interior.ColorIndex = xlNone Range(LastChange).EntireRow.Interior.ColorIndex = xlNone ActiveCell.EntireColumn.Interior.ColorIndex = 15 ActiveCell.EntireRow.Interior.ColorIndex = 15 LastChange = ActiveCell.Address Application.ScreenUpdating = True End Sub Source:http://www.mrexcel.com/archive/VBA/26758.html -- --Thomas [PBD] Working hard to make working easy. "Luthdawg" wrote: I am entering and analyzing data within an excel spreadsheet. Sometimes, due to the size of the document I have trouble determining what row I am looking at. Is there a way to have the row highlighted while I move from cell to cell. Ex: I am in cell R12 - entire Row 12 is highlighted, then i move to cell R13 and Row 13 becomes highlighted. |
All times are GMT +1. The time now is 05:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com