PC Review


Reply
Thread Tools Rate Thread

Alternate Shading for non-bold rows

 
 
andreashermle
Guest
Posts: n/a
 
      24th Mar 2010
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
 
Reply With Quote
 
 
 
 
andreashermle
Guest
Posts: n/a
 
      25th Mar 2010
On Mar 24, 10:56*am, joel <joel.48b...@thecodecage.com> 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.colorindex <>
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternate Row Shading (Visible Rows Only) Forgone Microsoft Excel Worksheet Functions 9 24th Sep 2008 06:26 AM
Alternate Shading of Rows in a Form R Hinds Microsoft Access Forms 2 10th Aug 2004 08:51 PM
shading alternate rows ardell Microsoft Excel Worksheet Functions 1 28th Jul 2004 09:48 PM
Alternate shading of rows Dale Hymel Microsoft Excel Worksheet Functions 2 24th Dec 2003 03:24 PM
Shading alternate rows in Excel whoray Microsoft Excel Misc 1 19th Oct 2003 06:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:07 AM.