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: 27,285
Default Conditional formatting with imported data

Use the calcuclate event and alter you code to loop through all cells of
interest. This will be slower, but shouldn't be a big impact.

See Chip Pearson's page on events
(http://www.cpearson.com/excel/events.htm ) if you are not familiar with the
calculate event.
--
Regards,
Tom Ogilvy

wrote in message
ups.com...
Hi

I want to change the colour of a cell depending on its value - I can
get past the 3 condition limit in Excel by using the code

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("AM2:AM1000")) Is Nothing Then Exit
Sub
On Error GoTo CleanUp
Application.EnableEvents = False
With Target
Select Case .Value
Case "Being Deployed": .Interior.ColorIndex = 45
'etc
End Select
End With

CleanUp:
Application.EnableEvents = True
End Sub


However this only works when i enter edit a cell - currently in my
spreadsheet i update cells by refreshing the import external data
query. This does not start the Worksheet_Change subroutine and
therefore the conditional formatting doesnt take place.

Any ideas on how i get past this?

cheers



 
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
Formatting with imported data Connie Excel Discussion (Misc queries) 2 December 8th 09 06:29 AM
Formatting Imported Data Fabs New Users to Excel 2 September 4th 09 01:25 PM
Formatting imported data [email protected] Excel Worksheet Functions 0 May 16th 08 02:43 PM
Formatting Imported Data JpaulT Excel Discussion (Misc queries) 1 September 13th 07 05:18 PM
Formatting imported data Jsb Excel Worksheet Functions 8 March 26th 06 11:48 PM


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