![]() |
Conditional format over a Range
Sorry if this is a repost...my post lost connection.
I need to change the format of cells that are changed in a range. One person sets up the sheet and another continues it. My supervisor wants to know if any changes have been made by the second (or third) user. We do not use a login to the workbook and who changes it is not important, just the knowledge that it was changed from it's original input. I'm a novice programmer so be gentle...I understand code, just don't have the hours in yet to be a master like you follks. |
Conditional format over a Range
Use the worksheet change function below. Thsi function will highligh change
cells in yellow. It must be put in every worksheet that you want changes recorded 1) go to tab on bottom of worksheet and right click. 2) select view code. Paste code below Sub worksheet_change(ByVal target As Range) For Each cell In target cell.Interior.ColorIndex = 6 Next cell End Sub If you want to limit the range of cells to track then use this type code instead Sub worksheet_change(ByVal target As Range) For Each cell In target If (cell.Row = 5) And (cell.Row <= 10) And _ (cell.Column = 4) And (cell.Column <= 15) Then cell.Interior.ColorIndex = 6 End If Next cell End Sub "outsol" wrote: Sorry if this is a repost...my post lost connection. I need to change the format of cells that are changed in a range. One person sets up the sheet and another continues it. My supervisor wants to know if any changes have been made by the second (or third) user. We do not use a login to the workbook and who changes it is not important, just the knowledge that it was changed from it's original input. I'm a novice programmer so be gentle...I understand code, just don't have the hours in yet to be a master like you follks. |
Conditional format over a Range
Thanks Joel, I'll try that tomorrow. I didn't know how to limit my target
range. I appreciate the quick response. "Joel" wrote: Use the worksheet change function below. Thsi function will highligh change cells in yellow. It must be put in every worksheet that you want changes recorded 1) go to tab on bottom of worksheet and right click. 2) select view code. Paste code below Sub worksheet_change(ByVal target As Range) For Each cell In target cell.Interior.ColorIndex = 6 Next cell End Sub If you want to limit the range of cells to track then use this type code instead Sub worksheet_change(ByVal target As Range) For Each cell In target If (cell.Row = 5) And (cell.Row <= 10) And _ (cell.Column = 4) And (cell.Column <= 15) Then cell.Interior.ColorIndex = 6 End If Next cell End Sub "outsol" wrote: Sorry if this is a repost...my post lost connection. I need to change the format of cells that are changed in a range. One person sets up the sheet and another continues it. My supervisor wants to know if any changes have been made by the second (or third) user. We do not use a login to the workbook and who changes it is not important, just the knowledge that it was changed from it's original input. I'm a novice programmer so be gentle...I understand code, just don't have the hours in yet to be a master like you follks. |
Conditional format over a Range
Tried it and the code works well. Here's the rub: I need to have this routine
run after the initial input. So the 1st user gets black on white, the next user if he edits get black on yellow, final user gets black on red. the worksheet will be closed between users. Any ideas???? "outsol" wrote: Thanks Joel, I'll try that tomorrow. I didn't know how to limit my target range. I appreciate the quick response. "Joel" wrote: Use the worksheet change function below. Thsi function will highligh change cells in yellow. It must be put in every worksheet that you want changes recorded 1) go to tab on bottom of worksheet and right click. 2) select view code. Paste code below Sub worksheet_change(ByVal target As Range) For Each cell In target cell.Interior.ColorIndex = 6 Next cell End Sub If you want to limit the range of cells to track then use this type code instead Sub worksheet_change(ByVal target As Range) For Each cell In target If (cell.Row = 5) And (cell.Row <= 10) And _ (cell.Column = 4) And (cell.Column <= 15) Then cell.Interior.ColorIndex = 6 End If Next cell End Sub "outsol" wrote: Sorry if this is a repost...my post lost connection. I need to change the format of cells that are changed in a range. One person sets up the sheet and another continues it. My supervisor wants to know if any changes have been made by the second (or third) user. We do not use a login to the workbook and who changes it is not important, just the knowledge that it was changed from it's original input. I'm a novice programmer so be gentle...I understand code, just don't have the hours in yet to be a master like you follks. |
All times are GMT +1. The time now is 12:10 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com