LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA Conditional Formatting Using Logical Expression

To aid in the understanding of my original questsion I thought I would post
my initial attempt at the code. There are more layers that I hope to add,
but I am having issues with the initial setup. There may be a better way to
do this than using the "case" function. I am open to any suggestions.

Here is a copy of my first try - hope it helps to get across what I am
trying to acheive:

''Highlight late Completes

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Deadline As Range
Dim Actual As Range
If Target.Cells.Count 1 Then Exit Sub
Actual = Target
Set Deadline = Range("C20") 'change to suit
Set Actual = Range("D20:H20") 'change to suit

If Not Intersect(Target, Deadline) Is Nothing Then
Select Case Actual
Case Is Deadline
Target.Interior.ColorIndex = 6 'Yellow
End Select
End If
End Sub

Thanks in advance for the help


 
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
logical expression help please KRK New Users to Excel 7 March 19th 09 05:02 PM
Can I use more complex logical expression for sumif as creteria? xwenx Excel Worksheet Functions 7 April 28th 06 12:53 AM
Logical Expression For MULTIPLE Cells??? [email protected] Excel Programming 2 December 22nd 05 11:03 PM
How do you determine if a field is blank in a logical expression. Van Excel Discussion (Misc queries) 2 December 5th 05 10:08 PM
Issue with representing a blank in a logical expression. Van Excel Programming 1 December 5th 05 08:24 PM


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