Need Conditional Format help :: MrExcel Message Board



 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

Need Conditional Format help
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

kelly1
Board Regular


Joined: 11 May 2003
Posts: 85


Status: Offline

 Reply with quote  

Need Conditional Format help

I have been using Conditional Format using 3 colours but noticed it severely slows the spreadsheet down.

Everything I do seem to take for ages, and this is on current spec systems.
When I removed the formatting the speed dramatically increases, is this normal?
The organisation I work for really need this facility on.

Would VBA be any better?

What I need is a different colour for the row from Column A to K based on text input in Column I which are “OK”, “Finish”, “Incident”,

I already have this code on the worksheet:


Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Count > 1 Then Exit Sub
If .Column = 1 Then .Offset(0, 5).Value = Format(Date, "mm/dd/yy")
If .Column = 8 And .Value = "Y" Then
Range("A" & .Row).Copy _
Worksheets("Incidents").Range("A65536").End(xlUp).Offset(1, 0)
Sheets(2).Select
MsgBox ("Transfer to Incidents Sheet Successful")
End If
End With
End Sub


Any help appreciated

Kelly

Post Fri Sep 19, 2003 7:49 pm 
 View user's profile Send private message

Iridium
Board Master
Board Master


Joined: 16 Jul 2002
Posts: 2581
Location: Walsall, England
Flag: England

Status: Offline

 Reply with quote  

Re: Need Conditional Format help

Thinking out aloud again but perhaps a Workshetet_SelectionChange with a Union and Select Case??? May be babble ....
_________________

Post Fri Sep 19, 2003 8:37 pm 
 View user's profile Send private message

kelly1
Board Regular


Joined: 11 May 2003
Posts: 85


Status: Offline

 Reply with quote  

Re: Need Conditional Format help

I don't understand

Post Sat Sep 20, 2003 2:33 am 
 View user's profile Send private message

Corleone
Board Master


Joined: 03 Feb 2003
Posts: 105
Location: Birmingham England

Status: Offline

 Reply with quote  

Re: Need Conditional Format help

It may be something to do with your range selection below
It will possibly work quicker if you reduce it to ("A1000") for example


Worksheets("Incidents").Range("A65536").

Corleone

Post Sat Sep 20, 2003 5:57 am 
 View user's profile Send private message Send e-mail

kelly1
Board Regular


Joined: 11 May 2003
Posts: 85


Status: Offline

 Reply with quote  

Re: Need Conditional Format help

That VBA is not really slowing it, its the conditional format that seems to be slowing it down, once removed it goes quick again.

Once the condition is met, it takes about 10 seconds to change colour.

I am using Excels formating and wondered if VBA would be better?

At the moment we are using 2000 rows but it is likely to go much higher.

Post Sat Sep 20, 2003 7:16 am 
 View user's profile Send private message

Iridium
Board Master
Board Master


Joined: 16 Jul 2002
Posts: 2581
Location: Walsall, England
Flag: England

Status: Offline

 Reply with quote  

Re: Need Conditional Format help

Here's what I was babbling on about - VBA conditional formatting example

code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("A1:A2000")) Is Nothing Then
Select Case Target
  Case 1
     icolor = 17
  Case 2
     icolor = 18
  Case 3
     icolor = 19
  Case 4
     icolor = 20
  Case 5
     icolor = 21
  Case Else
   icolor = 16
End Select
  Target.Interior.ColorIndex = icolor
End If
   
End Sub




Not sure if it'll be any faster than xl's cond formatting. You're s/s may be slow if you're calculating a lot of formulae. Also have a look at this link http://support.microsoft.com/default.aspx?scid=kb;en-us;215783&Product=xlw2K
_________________

Post Sat Sep 20, 2003 7:44 am 
 View user's profile Send private message

kelly1
Board Regular


Joined: 11 May 2003
Posts: 85


Status: Offline

 Reply with quote  

Re: Need Conditional Format help

I guess it means formatting over 2050 rows rather than 2050 rows on the spreadsheet.

I have one S/S with 4000 rows and that cond/formt ok, but I suppose its only formatting about 1500 rows.

So what is the solution if you need to format 5000+ rows?

Post Sat Sep 20, 2003 10:38 am 
 View user's profile Send private message
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.