detriez
Board Regular
- Joined
- Sep 13, 2011
- Messages
- 193
- Office Version
- 365
- Platform
- Windows
I have two Dynamic Named Ranges I need to use in sub
I am looking for values in nDataCounrty that do not exist in nCountry
This working code does not accommodate the expansion of the dynamic named ranges
I need to do something like this
- E2 needs to be replaced with Named Range nDataCountry
- 'Standard Values'!$B$2:$B$251 needs to be replaced with Named Range nCountry
I am looking for values in nDataCounrty that do not exist in nCountry
This working code does not accommodate the expansion of the dynamic named ranges
Code:
Range("[COLOR=#0000ff]E2:E24[/COLOR]").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND([COLOR=#0000ff]E2[/COLOR]<>"""",ISERROR(MATCH([COLOR=#0000ff]E2[/COLOR],[COLOR=#ff8c00]'Standard Values'!$B$2:$B$251[/COLOR],0)))"
I need to do something like this
Code:
Range("[COLOR=#0000ff]nDataCountry[/COLOR]").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND([COLOR=#0000ff]nDataCountry[/COLOR]<>"""",ISERROR(MATCH([COLOR=#0000ff]nDataCountry[/COLOR],[COLOR=#ff8c00]nCountry[/COLOR],0)))"