+ Reply to Thread
Results 1 to 5 of 5

Extract a list of products from a supplier

  1. #1
    Forum Contributor
    Join Date
    08-23-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    139

    Extract a list of products from a supplier

    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.

    Please Login or Register  to view this content.
    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 code

    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")
    Last edited by jayherring86; 09-02-2016 at 06:43 AM. Reason: clarity of where the list is to be located
    IF("helping me", "thanks", "need more detail?")

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Extract a list of products from a supplier

    Hello
    Not sure about your code but have you considered using the Dictionary Object in VBA to create a unique list of your codes and printing those to cells?

    DBY

  3. #3
    Forum Contributor
    Join Date
    08-23-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: Extract a list of products from a supplier

    No i haven't. I wouldn't mind trying but have never really used dictionary objects before.

    As long as the result is a fast one, and you don't mind giving me the directions to do it then i don't mind giving it a go.

    By directions, i mean either a straight answer, or a link to a resource of some kind

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Extract a list of products from a supplier

    I'll upload an example file to show how this might work. Give me a few minutes.

  5. #5
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Extract a list of products from a supplier

    Take a look at the attached example. Perhaps you could adapt something like this? It copies each code to the Supplier sheet without duplicates.

    DBY
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Formula that list items from a supplier
    By ricdamiani in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-11-2016, 02:31 AM
  2. [SOLVED] Updating discontinued products from supplier using 2 sheets
    By thedj25 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-29-2013, 01:43 PM
  3. [SOLVED] Help on finding supplier on list
    By kumarinrajoo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-23-2013, 01:13 AM
  4. Replies: 4
    Last Post: 02-15-2013, 08:02 AM
  5. [SOLVED] How to list the cheapest supplier for certain products
    By Yelik in forum Excel General
    Replies: 7
    Last Post: 11-05-2012, 02:44 AM
  6. finding lowest cost from supplier list
    By jimbokeep in forum Excel General
    Replies: 4
    Last Post: 08-05-2010, 06:03 AM
  7. extract all the products mentioned in a column
    By saadeet in forum Excel General
    Replies: 5
    Last Post: 03-03-2007, 03:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1