Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default conditional formating

I have used the code below, how do I run it for a table of existing data

Private Sub Worksheet_Change(ByVal Target As Range)

Dim icolor As Integer



If Not Intersect(Target, Range("A1:AA200")) Is Nothing Then

Select Case Target

Case 15000 To 20000

icolor = 4

Case 14000 To 14999

icolor = 43

Case 13000 To 13999

icolor = 10

Case 12000 To 12999

icolor = 6

Case 11000 To 11999

icolor = 44

Case 10000 To 10999

icolor = 45

Case 9000 To 9999

icolor = 46

Case 8000 To 8999

icolor = 3

Case Else

icolor = 2

End Select

Target.Interior.ColorIndex = icolor

End If

End Sub

--
Harry D
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
Help ....! Conditional Formating housinglad Excel Discussion (Misc queries) 1 February 9th 10 11:11 PM
conditional formating using mod gtslabs Excel Discussion (Misc queries) 1 March 19th 09 06:55 PM
conditional formating Jase Excel Discussion (Misc queries) 3 October 14th 08 07:40 PM
Conditional Formating Jerrold Excel Programming 1 January 9th 08 02:00 AM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM


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