![]() |
Alternate Shading for non-bold rows
Dear Experts:
below code snippet (taken from a macro to alternately shade rows: Courtesy by Chris Bottomley, EE) should be CHANGED to work on rows that have NO BOLD FONT FORMATTING instead of a "IsNumeric" property. Hope this is feasible. Help is much appreciated. Thank you very much in advance. Regards, Andreas Code snippet cut out from a macro to shade rows: For Each rw In Selection.Rows If IsNumeric(ThisWorkbook.Sheets(1).Cells(rw.Row, 1)) Then For Each col In Selection.Columns If bolRed Then ThisWorkbook.Sheets(1).Cells(rw.Row, col.Column).Interior.Color = RGB(239, 211, 210) ThisWorkbook.Sheets(1).Cells(rw.Row, col.Column).Font.Color = vbBlack Else ThisWorkbook.Sheets(1).Cells(rw.Row, col.Column).Interior.Color = RGB(229, 229, 229) ThisWorkbook.Sheets(1).Cells(rw.Row, col.Column).Font.Color = vbBlack End If Next |
Alternate Shading for non-bold rows
Your is only checking column A for shading from If IsNumeric(ThisWorkbook.Sheets(1).Cells(rw.Row, 1)) to if ThisWorkbook.Sheets(1).Cells(rw.Row,1).interior.co lorindex < xlnone -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=190077 http://www.thecodecage.com/forumz |
Alternate Shading for non-bold rows
On Mar 24, 10:56*am, joel wrote:
Your is only checking column A for shading from If IsNumeric(ThisWorkbook.Sheets(1).Cells(rw.Row, 1)) to if ThisWorkbook.Sheets(1).Cells(rw.Row,1).interior.co lorindex < xlnone -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=190077 http://www.thecodecage.com/forumz Hi Joel, thank you very much for your tip. It help me to solve my problem. Thank you again. Regards, Andreas |
All times are GMT +1. The time now is 12:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com