Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Conditional formatting Run-time error '5'

I have been using this code for quite some time now 1 year. All of a
sudden it stopped working and is giving me a "Run-time error '5' Invalid
procedure call or argument."

The code is was selecting a range of entered cells for column K starting at
row 9 and then selecting down to the last entered cell in that column. Can
anyone tell me why it is not working now when it was just a week ago?

Here is the code:

Sub DupsColK()
'
' DupsColK Macro
' '

'
Range("K9").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=IF(COUNTIF($K:$K,$K9)1,COUNTIF($K$9:$K9,$K9)=1) "
Selection.FormatConditions(1).Interior.ColorIndex = 4
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=IF(COUNTIF($K:$K,$K9)1,COUNTIF($K$9:$K9,$K9)1) "
Selection.FormatConditions(2).Interior.ColorIndex = 19
End Sub
Reply
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
Conditional Formatting Error marwildfw Excel Worksheet Functions 3 August 26th 09 04:44 AM
error with conditional formatting Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 8 May 20th 08 03:41 PM
Conditional Formatting Error Debbie Excel Discussion (Misc queries) 2 April 28th 08 07:02 PM
Conditional formatting error [email protected] Excel Discussion (Misc queries) 4 May 22nd 06 03:18 PM
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM


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