Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Shade Cells Yellows if Column (D) has a value of C in Cell


Please help me put together a macro that will search Column (D), starting in
row 30 for a character 'C', if true then shade all cells in that row yellow
between Column D and Column AC and strike through all values in that same
range of Columns. Column D will have at the most one character in a row.

Thanks so much for the help.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Shade Cells Yellows if Column (D) has a value of C in Cell

Sub highlightStuff()
For i = 30 To Cells(Rows.Count, 4).End(xlUp).Row
If Cells(i, 4).Text = "C" Then
With Range(Cells(i, 4), Cells(i, 29))
.Interior.ColorIndex = 6
.Font.Strikethrough = True
End With
End If
Next i
End Sub

Dean P. wrote:
Please help me put together a macro that will search Column (D), starting in
row 30 for a character 'C', if true then shade all cells in that row yellow
between Column D and Column AC and strike through all values in that same
range of Columns. Column D will have at the most one character in a row.

Thanks so much for the help.


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
shade one cell that will shade multiple cells Walt Excel Discussion (Misc queries) 1 November 17th 09 03:46 PM
How to change shade of cells when selecting multiple cells abrummet Excel Discussion (Misc queries) 3 September 6th 07 11:42 AM
Trying to shade cells XP Excel Programming 2 August 23rd 07 08:44 PM
Shade Active Cell - Shade the cell the cursor is in only while in Lisa Excel Programming 2 April 17th 07 10:00 PM
shade cells superkopite Excel Discussion (Misc queries) 11 January 21st 06 10:33 PM


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

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

About Us

"It's about Microsoft Excel"