Hello,
I have been struggling to write a macro that conditionally highlight a tab when a comment is entered into a column. This macro works just like the conditional formatting feature of Excel. A tab will be automatically highlighted if a comment is entered into a column, and it will be again automatically unhighlighted if the comment is removed by the user.
Your help would be very much appreciated.
I have been looking for help on Excel Forum but it doesn't seem to go anywhere. I have recently learned about Chandoo.org from my superior and decided to seek help here. My apology for cross posting, but I do need help on this macro and the question has been out for a while.
A sample workbook can be found here: http://www.mediafire.com/view/?57j19bklqqouas8
Essentially, on every tab, if a comment or note is placed into the column called 'Company Notes', the tab will be highlighted in yellow. In addition, if another note is entered into any of the columns Client Notes, Requested Element Extension, Requested Element Definition, the tab will be automatically highlighted orange. This formatting will overwrite the Company Notes formatting. Please let me know if you have any questions. FYI, all data are public and nothing is confidential.
I have many workbooks like this to go through and format, so I'm looking for a macro that can be put into my personal workbook and run from there.
I have received a response on Excel Forum with the macro below. However, this one has to be put in "ThisWorkbook" - which is not exactly what I was looking for.
Sub Workbook_SheetChange(ByVal sh As Object, ByVal Target As Range)
If Not Intersect(Range("A:A"), Target) Is Nothing Then
ActiveSheet.Tab.ColorIndex = 9
End If
End Sub
I have been struggling to write a macro that conditionally highlight a tab when a comment is entered into a column. This macro works just like the conditional formatting feature of Excel. A tab will be automatically highlighted if a comment is entered into a column, and it will be again automatically unhighlighted if the comment is removed by the user.
Your help would be very much appreciated.
I have been looking for help on Excel Forum but it doesn't seem to go anywhere. I have recently learned about Chandoo.org from my superior and decided to seek help here. My apology for cross posting, but I do need help on this macro and the question has been out for a while.
A sample workbook can be found here: http://www.mediafire.com/view/?57j19bklqqouas8
Essentially, on every tab, if a comment or note is placed into the column called 'Company Notes', the tab will be highlighted in yellow. In addition, if another note is entered into any of the columns Client Notes, Requested Element Extension, Requested Element Definition, the tab will be automatically highlighted orange. This formatting will overwrite the Company Notes formatting. Please let me know if you have any questions. FYI, all data are public and nothing is confidential.
I have many workbooks like this to go through and format, so I'm looking for a macro that can be put into my personal workbook and run from there.
I have received a response on Excel Forum with the macro below. However, this one has to be put in "ThisWorkbook" - which is not exactly what I was looking for.
Sub Workbook_SheetChange(ByVal sh As Object, ByVal Target As Range)
If Not Intersect(Range("A:A"), Target) Is Nothing Then
ActiveSheet.Tab.ColorIndex = 9
End If
End Sub