LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Auto Fill Color of a particular Cell if conditions are put

Note: This assumes you have contiguous data in column "A." You can
modify as necessary.

Sub fillBasedOnValue()

Dim myCell As Variant
Set myCell = Range("A2")

Do While Not IsEmpty(myCell)
Set nextcell = myCell.Offset(1, 0)

Select Case myCell

Case 51 To 69
myCell.Interior.Color = vbYellow

Case 70 To 90
myCell.Interior.Color = vbGreen

Case Is 90
myCell.Interior.Color = vbRed

End Select

Set myCell = nextcell

Loop

MsgBox "File Done"

End Sub

 
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
Auto Fill Color Cell Steve Excel Worksheet Functions 1 July 15th 08 01:18 AM
How I auto fill a cell patern or color based on a pick list? bbjr Excel Discussion (Misc queries) 3 April 21st 08 07:50 PM
auto fill color of row capital letter Excel Worksheet Functions 4 November 7th 07 06:44 PM
auto fill color of row capital letter Excel Worksheet Functions 3 November 6th 07 01:49 PM
auto color fill cells Chopper New Users to Excel 6 March 6th 06 03:04 AM


All times are GMT +1. The time now is 05:35 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"