Unfortunately, I can't figure out a way to accomplish what I want using the Excel GUI. I'm curious if this can be done using VBA code? The code currently marks Duplicate entries in Column D. I'd like it to extend a border around the conditional formatted cell in Column D and the cell directly to its right in Column E. Is this possible?


What The Code Does
cf1.png


What I Would Like The Code To Do
cf2.png


Sub Excel_HMMap_Conditional_Formatting_P8()
   lngLastRow = Cells(Rows.Count, "A").End(xlUp).Row
   Range("A1:A" & lngLastRow).Select
   Selection.FormatConditions.AddUniqueValues
   Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
   Selection.FormatConditions(1).DupeUnique = xlDuplicate
   With Selection.FormatConditions(1).Font
       .Bold = True
       .Italic = False
       .Strikethrough = False
       .ThemeColor = xlThemeColorLight1
       .TintAndShade = 0
   End With
   Selection.FormatConditions(1).Borders(xlLeft).LineStyle = xlNone
   Selection.FormatConditions(1).Borders(xlRight).LineStyle = xlNone
   Selection.FormatConditions(1).Borders(xlTop).LineStyle = xlNone
   Selection.FormatConditions(1).Borders(xlBottom).LineStyle = xlNone
   With Selection.FormatConditions(1).Interior
       .PatternColorIndex = xlAutomatic
       .Color = 15527148
       .TintAndShade = 0
   End With
   Selection.FormatConditions(1).StopIfTrue = False
End Sub