Thread
:
Compare 2 Lists and Take an Action Q
View Single Post
#
12
Posted to microsoft.public.excel.programming
Claus Busch
external usenet poster
Posts: 3,872
Compare 2 Lists and Take an Action Q
Hi Sean,
Am Mon, 21 Nov 2016 08:09:06 -0800 (PST) schrieb
:
For i = 2 To LBound(varA) ' start in row 2 to allow for headers
For j = 2 To LBound(varB) ' start in row 2 to allow for headers
you have to loop from second value to last value. The last value of an
array is Ubound *NOT* LBound
Change the two lines to:
For i = 2 To UBound(varA) ' start in row 2 to allow for headers
For j = 2 To UBound(varB) ' start in row 2 to allow for headers
Regards
Claus B.
--
Windows10
Office 2016
Reply With Quote
Claus Busch
View Public Profile
Find all posts by Claus Busch