+ Reply to Thread
Results 1 to 5 of 5

VB- Avoid extracting same results twice.

  1. #1
    Registered User
    Join Date
    01-25-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    11

    Wink VB- Avoid extracting same results twice.

    Total VB novice coming in here. First time I've ever used it.

    I'm trying to create a tool for my company that will help sales create equipment lists with prices, part numbers, quantities. I've managed to accomplish something close to what i want using a button on. Which then extracts any Row in the product table with a value >=1 in the quantity section.

    However, the problem I am facing now is that every time I press the button on the manufacturer page to deploy the Macro and extract the data it will add the same units again, essentially duplicating the rows. I'm sure there is a way to prevent this but I can't figure it out with my basic VB knowledge.

    Some guidance on how to correctly do this would be super helpful! I've attached a sample work book which is clear.

    Thanks,
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,198

    Re: VB- Avoid extracting same results twice.

    I think you need to explain a little more
    changing your line of code to
    Please Login or Register  to view this content.
    works but what should happen if the quantities have changed? or the prices have changed? it does not account for this

  3. #3
    Registered User
    Join Date
    01-25-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    11

    Re: VB- Avoid extracting same results twice.

    Thanks for the reply,

    If the quantities or price changed in page 'sonos' I would either want the list to change automatically (is this possible?). Or through clicking the command button which would re deploy the command and update the equipment list?

    How would I account for this scenario?

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,198

    Re: VB- Avoid extracting same results twice.

    Perhaps the below, it could be done more elegantly but seems to work.
    My logic is If it exists already in the list delete it, then you can copy the new value to the bottom and there will be no duplicates

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-25-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    11

    Re: VB- Avoid extracting same results twice.

    Thanks for the excellent help. Appreciate it.

    I now require that data that has been exported to be in a drop down style table, where a user could filter by product. How would i address the results to input into this table?

    Currently what happens is if i create a table on the 'equipment list', the data that qualifies to move to the sheet ignores this and goes to the first Cell below the table?

    Thanks

+ 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. Replies: 4
    Last Post: 01-13-2019, 01:46 PM
  2. Extracting web results for multiple searches
    By lonctp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2014, 07:03 AM
  3. [SOLVED] Trying to avoid duplicated results
    By Shoey263 in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 07-24-2014, 09:20 AM
  4. Replies: 3
    Last Post: 10-30-2013, 09:18 AM
  5. [SOLVED] Need help extracting values from variable length results
    By hkshwa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2013, 09:22 PM
  6. Extracting data from match results
    By skavorn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2010, 07:18 AM
  7. Extracting a delimited CSV gave weird results.
    By Aswathy in forum Excel General
    Replies: 6
    Last Post: 10-21-2008, 04:13 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