Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default 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
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
How do I alternate shading of rows, Excel 2007, no new tabs. jrgspyder Excel Discussion (Misc queries) 1 June 11th 09 03:21 AM
Alternate Row Shading (Visible Rows Only) Forgone Excel Worksheet Functions 9 September 24th 08 06:26 AM
Shading alternate "groups" of rows? Lee Harris Excel Worksheet Functions 6 September 17th 06 03:43 PM
shading alternate rows, but losing format when one row is deleted Candice Excel Discussion (Misc queries) 8 May 11th 06 04:01 AM
Alternate Shading tamiluchi Excel Discussion (Misc queries) 9 April 28th 06 08:55 PM


All times are GMT +1. The time now is 12:58 PM.

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

About Us

"It's about Microsoft Excel"