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

Thanks your good advice.
I simply wrote a macro that runs from a command button to run the
conditional formatting code in question. 18,000 cell in about 4 sec,
so I can handle that.

JDB

For the record and anyone else looking at this, I am a hacker, but this
works for me.
-------------------------------
Private Sub CommandButton1_Click()
Call ConditionalFormat
End Sub


Private Sub ConditionalFormat()
Dim icolor As Integer
Dim R As Integer
Dim C As Integer

RangeName = "DataMatrix"

FCol = Range(RangeName).Column
FRow = Range(RangeName).Row

For R = FRow To 3200 Step 1
If Cells(R, FCol) = "" Then
Exit For
End If
For C = FCol To 64 Step 1
If Cells(R, C) = "" Then
Exit For
End If
TargetCell = Round(Cells(R, C), 0)

Select Case TargetCell
Case 0 To 28
icolor = 37
Case 29 To 60
icolor = 41
Case 61 To 90
icolor = 39
Case 91 To 120
icolor = 43
Case 121 To 150
icolor = 6
Case 151 To 180
icolor = 46
Case Else
icolor = 3
End Select

Cells(R, C).Interior.ColorIndex = icolor

Next C
Next R

End Sub
-----------------------------------------------






Bob Phillips wrote:
With Calculate, you will get 18,000 recalculating for every cell change. It
can only be slower.

--

HTH

Bob Phillips


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
Conditional Formatting in Excel Brian New Users to Excel 4 December 10th 09 08:40 PM
Excel conditional formatting Lewy Excel Worksheet Functions 3 August 24th 09 05:06 PM
Conditional Formatting in Excel Yossy Excel Worksheet Functions 1 October 31st 08 06:10 AM
conditional formatting in excel Pritchett Excel Worksheet Functions 3 March 27th 06 11:37 AM
Conditional Formatting in Excel BaptistKitty Excel Worksheet Functions 2 February 5th 06 06:33 PM


All times are GMT +1. The time now is 11:12 AM.

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"