C
CG Rosén
Hi Group,
Have problem with the code below. LookupRng1 and LookupRng2
are columns with dates formatet as YYYY-MM-DD. When running
the code the result is that no dates are found.
Any hint on whats wrong are welcomed.
Brgds
CG Rosen
--------------------------------------------------------
Dim LookupRng1 As Range
Dim LookupRng2 As Range
Dim cCell As Range
Dim a As Long
For Each cCell In LookupRng1
a = 0
With LookupRng2
Set j = .Find(cCell, _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows)
If Not j Is Nothing Then
firstAddress = j.Address
Do
a = a + 1
Set j = .FindNext(j)
Loop While Not j Is Nothing And j.Address <> firstAddress
End If
Msgbox a
End With
Next cCell
Have problem with the code below. LookupRng1 and LookupRng2
are columns with dates formatet as YYYY-MM-DD. When running
the code the result is that no dates are found.
Any hint on whats wrong are welcomed.
Brgds
CG Rosen
--------------------------------------------------------
Dim LookupRng1 As Range
Dim LookupRng2 As Range
Dim cCell As Range
Dim a As Long
For Each cCell In LookupRng1
a = 0
With LookupRng2
Set j = .Find(cCell, _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows)
If Not j Is Nothing Then
firstAddress = j.Address
Do
a = a + 1
Set j = .FindNext(j)
Loop While Not j Is Nothing And j.Address <> firstAddress
End If
Msgbox a
End With
Next cCell