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: 10
Default Code in 2003 not working in 2007

Below is part of my code from a macro that worked fine in 2003, but does not
work the same in 2007. In 2003, the code would filter a certain field and
change the interior cell color of only the visibile cells with in the
selection. In 2007, it changes the color of all the cells with in the range
specified (A6:AC3610). Why is this different in 2007 and how do I correct
it. Any help is greatly appreciated. Thanks.

Range("A6:ac3610").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=IF($A6<"""",IF($G6=2,$aa6=1.1,$aa60))"
Selection.FormatConditions(1).Font.ColorIndex = 50
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=IF($A6<"""",IF($G6=2,$aa6<2,$aa6<1))"
Selection.FormatConditions(2).Interior.ColorIndex = 3


' Filters spread sheet

Selection.AutoFilter Field:=27, Criteria1:="<1.1", Operator:=xlAnd

' Changes color on visible cells within my range

With Selection.Interior
.ColorIndex = 45
.Pattern = xlSolid
End With
 
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
Charts from 2003 not working in 2007 tpgexcel Excel Discussion (Misc queries) 2 September 2nd 09 09:42 PM
2003--2007 recognize if i'm in 2007 or 2003 via code. Miri Excel Programming 3 October 15th 08 02:50 PM
2007 code not working in 2003 Imran J Khan Excel Programming 5 September 2nd 08 09:00 PM
Working Between Excell 2003 & 2007 Val Excel Worksheet Functions 2 August 14th 08 10:03 PM
Formulas in 2007 not working in 2003 Andrew Excel Worksheet Functions 22 January 28th 08 06:10 PM


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