I have a source sheet (“Truck”) from which I copy the unique values to target sheet (“TruckFiltered”). Excel then uses a loop to loop through each individual value in (“TruckFiltered”).Range(“H1”) and run an autofilter to filter out the last update from the source table (1 row returned) and then copy-destination copies the value in the adjacent column in the source table to the value that the autofilter has been run on, (“TruckFiltered”).Range(“H1”). So the auofilter should only be run once on each value in the unique list in column “A” in table (“TruckFiltered”) which it gets from (“TruckFiltered”).Range(“H1”) on each iteration of the loop.
The problem is that the autofilter is running multiple times on the same value despite the value in (“TruckFiltered”).Range(“H1”) changing on each iteration of the loop (values in “Red” on source and target sheets). Also the returned value for the first iteration of the lookp is not copies to sheet (“TruckFiltered”). The end result have no copied value for the first iteration of the loop and I have multiple values returned from the autofilter and copied to the column adjacent to the unique list which the loop runs through instead of getting the single lastest update value for each unique value in sheet (“TruckFiltered”).
I’ve struggled with this issue for days now. Your assistance would be greatly appreciated...thanks in advance.
Bookmarks