LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Can't get CF to work properly, Active Cell problem?

I apologize for the re-post, but I was suprised my original went unanwsered.
I'm sure someone knows what I am doing worng.

I have the following code called by the Workbook_SheetCalculate event. It
works, however it seems to have a mind of it's own. When I check the
conditonal format of Cell G2 it reads =AND($H3="",$G3<=TODAY()). It should
read H2 & G2. I don't understand what is causing this, At other times the
numbers are way
off for instance H62000 and other times I get the !REF error.

I have tried various methods to first select or activate cell G2 prior to
running this code but nothing seems to help.

What am I doing wrong that Excel won't start at G2 and autofill down
incrementing as needed

For Each Sh In ThisWorkbook.Worksheets
shLast = LastRow(Sh)
With Sh.Range("G2:G" & shLast)
.FormatConditions.Delete
.FormatConditions.Add
Type:=xlExpression,Formula1:="=AND($H2="""",$G2<=T ODAY())"
.FormatConditions(1).Font.Bold = True
.FormatConditions(1).Font.ColorIndex = 3
End With
Next


 
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
OR(EXACT(Cell; Range)) does not work properly Dave Peterson Excel Worksheet Functions 4 January 1st 07 03:11 AM
Cell Referal between tabs fails to work properly on home computer [email protected] Excel Worksheet Functions 0 November 28th 06 01:03 AM
AutomaticScale doesn't work properly Carlo Charts and Charting in Excel 2 September 21st 06 07:00 AM
Excel VBA-use variable in active cell formula problem waveracerr Excel Programming 9 February 6th 04 02:49 PM
Problem with Active Cell Refence patterson_m Excel Programming 1 October 10th 03 06:34 PM


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