silentwolf
Well-known Member
- Joined
- May 14, 2008
- Messages
- 1,216
- Office Version
- 2016
Hi guys,
I got in my workbook two named ranges for two countries and there holidays.
A conditional formating I was able to create in my workbook but I would like to have it more dynamic and therefore within vba.
If range("B2"). value = "Germany" I like to use the named range "Holidays_Germany" to conditional format the dates in wksDates.. beginning at range "B5".
If it is "Austria" then use "Holidays_Austria" as the vlookup.
In the normal conditional formating I got it like this .."=vlookup(A5,Holidays_Germany,1,0)
It works fine but how can you achieve that in vba? To have a vlookup is not the issue but combined with a conditional formating I don't know.
Has someone maybe time to help me with this issue?
Greatly appreciated.
I got in my workbook two named ranges for two countries and there holidays.
A conditional formating I was able to create in my workbook but I would like to have it more dynamic and therefore within vba.
If range("B2"). value = "Germany" I like to use the named range "Holidays_Germany" to conditional format the dates in wksDates.. beginning at range "B5".
If it is "Austria" then use "Holidays_Austria" as the vlookup.
In the normal conditional formating I got it like this .."=vlookup(A5,Holidays_Germany,1,0)
It works fine but how can you achieve that in vba? To have a vlookup is not the issue but combined with a conditional formating I don't know.
Has someone maybe time to help me with this issue?
Greatly appreciated.
Last edited: