I have to match both columns below. To get a match you need to sum/combine some values in TC column and combine some values in AE column. (Per sample table below - e.g-1 sum of Items 1 & 2 of TC Column (20,378) will match to the sum of items 2 & 3 of AE Column (20,378) e.-2 sum of items 15,18,19 of TC Column will match to the sum of items 12, 14, 15, 16, 20 of AE column). No single amount to sum values matching. To get a match you always need to sum values in both columns.
In my original code, these columns are stored in two different arrays. So I have to perform the loop matching inside these arrays. Hence, the reason why my code begins with storing the values in two arrays below.
This is what I want to achieve in my loop:
IF TCval 1 + TCval 3 = AEval1 + AEval2 + AEvall3 etc.. Then
Color the matched cells and set the values to 0 in both arrays then re-perform the loop again.
zKbOs.png
This what I have so far. Nested loop. Just finished 2 TC vs 2AE, 3AE etc... i need to compare up til 5 TC. Im sure there is a better way to do this or may be a better way to code my loops.
Please Login or Register to view this content.
Bookmarks