Hello everyone,
On my worksheet i am trying to make a sub which will ask for a supplier name and then list all the product codes that are associated to that supplier without duplicating item codes.
The code i have (posted below) is working fine for product codes that contain text at the end (eg 1234blue) but duplicates each and every one of the product codes that does not (eg 1234). The list that it is looking at ("transactions") is a long list that contains all stock movements so there are 40-50 instances of each product code. It gets strName from an input box asking the user which supplier they would like to look up.
The code i have posted does include "trim()" which was my latest attempt at fixing the problem. I've left these in but they make no difference and will take them out to clean up the finished codePlease Login or Register to view this content.
Can anyone give me advice on why this might be happening? (as well as any fixes)
Edited for clarity: So the MyRange is column A on a seperate sheet. The finished list will be located on sheet("Supplier").Range("A:A")
Bookmarks