I want to find two equal and opposite values in a given range and highlight both of them.
Just got know that VBA has Dictionary as well and tried to solve the problem using that.
I don't want to publish working data to a sheet but not sure how to do it like I can do in Python by assigning a list to a Dictionary.
I saw an answer to a similar question but it ignores the fact there might more than 1 entries (like 10,10, -10).
I want to only highlight if there is no confusion regarding the pair (the range has 32 and -32 only).
So far I have done the basic work:
Dim dict As Object
Dim cl As Range, rng As Range
Set dict = CreateObject("Scripting.Dictionary")
Set rng = Range("AH" & AbsStart & ":AH" & AHEnd)
For Each cl In rng.Cells
dict(cl.Row) = dict(cl.Row) + 1
Next
Dim VarKey As Variant
For Each VarKey In dict.Keys()
If dict(VarKey) = 2 Then
Next