+ Reply to Thread
Results 1 to 18 of 18

Find Data and create new list(s)

  1. #1
    Registered User
    Join Date
    09-14-2018
    Location
    Minnesota
    MS-Off Ver
    2016
    Posts
    14

    Find Data and create new list(s)

    I would like to take the list from the "find unique items" tab, find where those entries appear in the L column of the strings sheet and return the entries in column C and D (of the strings sheet) in each row where it finds a match. It would also be amazing if this could automatically update whenever the strings sheet has changes made.

    I have attached two pictures to better explain what I am asking for.

    Capture4.PNG
    The magenta and green highlights represent unique entries from the unique list. The yellow highlights represent data that needs to be pulled (yes I realize that I missed an entry or two haha).

    Capture3.PNG
    This image shows the format of the output I am hoping to achieve. Every time it finds an entry and creates a line showing the unique entry and then the data from columns C and D next to it.

    I have attached my worksheet as well.

    Thanks in advance!!
    Attached Files Attached Files
    Last edited by Chrono9084; 09-27-2018 at 12:02 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Find Data and create new list(s)

    Hi, if I have understood you correctly, my solution should be in line with your expectations. In the 'find unique items' sheet, column A has uniques and column D has end results.
    Please Login or Register  to view this content.
    Regards

  3. #3
    Registered User
    Join Date
    09-14-2018
    Location
    Minnesota
    MS-Off Ver
    2016
    Posts
    14

    Re: Find Data and create new list(s)

    Maras,

    This is great and does work. Thanks!

    I do have one question though: Is there any way to get this to automatically update and alphabetically sort the results similar to the find uniques code originally written by Fluff13 shown below? The goal is that whenever a change is made in the strings tab that the list will update accordingly.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Find Data and create new list(s)

    This mod to the code that maras_mak supplied, should do what you want
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Find Data and create new list(s)

    @Fluff13, for example, you will make 15 changes to the 'strings' sheet in different columns - it can be in Column C, D and what?
    It seems to me that it is better to assign a macro to the 'Worksheet_Activate ()' event of the 'find unique items' worksheet.
    After all changes in the 'strings' sheet (columns C or D or L), you activate the 'find unique items' sheet and you have all changes - only once the macro is executed!
    There would have to be small changes in your macro.
    Regards.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Find Data and create new list(s)

    Personally I'd just run the macro manually after all changes have been made, but the OP wanted it to be automatic whenever a change was made.
    That said, I forgot to change this line
    Please Login or Register  to view this content.
    It should be
    Please Login or Register  to view this content.
    To take into account any changes in cols C:D

  7. #7
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Find Data and create new list(s)

    The results are in another sheet and after the change you can not see the results.
    Changes can be seen in the activation of another worksheet!
    Regards.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Find Data and create new list(s)

    Agreed, but I have no idea what the sheet will be used for & the OP said in a previous thread
    that it will update in real time as the data is manipulated.
    So that is what I have done.
    If you feel that an activate event is better, then feel free to post one. That way the OP has a choice

  9. #9
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Find Data and create new list(s)

    @ Fluff13, I do not think it's better, but practice tells me that. Hence my suggestion.
    Please Login or Register  to view this content.
    Regards.

  10. #10
    Registered User
    Join Date
    09-14-2018
    Location
    Minnesota
    MS-Off Ver
    2016
    Posts
    14

    Re: Find Data and create new list(s)

    Just an FYI, the spreadsheet is actually used by our electrical engineers. It is taking data from a Cable Schedule (col b = cable name, col c = cable type, col L = cable route). The idea is to first look at the route column (L) to determine all possible pathways the cable can go (these are either conduit or cable tray), and then find out which cables are in each of those segments. That is why the script shows each segment (route) with every cable that is associated with it. Those results will then be used to calculate the fill percentage of each segment (each conduit and cable tray can hold a different amount of cable and each cable type is a different size).

  11. #11
    Registered User
    Join Date
    09-14-2018
    Location
    Minnesota
    MS-Off Ver
    2016
    Posts
    14

    Re: Find Data and create new list(s)

    Guys,

    I found one glitch/issue with the scripts you wrote and am wondering if its easy to fix it.

    The find unique list that resides in the column A of the find unique items worksheet acts strangely. I will do my best to explain this correctly. Let's say you start with 10 unique items. The unique item list will display 10 (great). Now if you add 4 the list will update correctly and show 14 (also great). If you remove any, however, it leaves remnant information in spots which should be blank. So if you remove 2 objects from a list of 14, it will still show 14 items but the last two will just be leftovers that were not cleared. Is it hard to change the script to clear cells after the list? The data in D/E/F act correctly.

  12. #12
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Find Data and create new list(s)

    Just add this line
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    09-14-2018
    Location
    Minnesota
    MS-Off Ver
    2016
    Posts
    14

    Re: Find Data and create new list(s)

    Thanks again Fluff13!

    For the sake of learning...I was wondering if you could possible highlight the areas in the script that can/need to be modified if I were to aim this script at different data.

    For instance, I was trying to aim this at column V instead of L. I tried changing the following red lines but it wouldn't work and I am sure I am just missing something. I changed both L's to V's and changed the 10 to 20 as that is the number of columns (I made an assumption here).

    Please Login or Register  to view this content.

  14. #14
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Find Data and create new list(s)

    Your changes are correct, you just missed one.
    Please Login or Register  to view this content.
    This is saying if the changes was not in col L Exit. Change it to 22

  15. #15
    Registered User
    Join Date
    09-14-2018
    Location
    Minnesota
    MS-Off Ver
    2016
    Posts
    14

    Re: Find Data and create new list(s)

    And if I wanted to add another column ("U") from the Cable Routing sheet and pull it to the unique items sheet....would it look like this? Something tells me I need to change the blue line to read ReDim ar_F(1 To 40000, 1 To 4)

    Please Login or Register  to view this content.

  16. #16
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Find Data and create new list(s)

    have you tried it?

  17. #17
    Registered User
    Join Date
    09-14-2018
    Location
    Minnesota
    MS-Off Ver
    2016
    Posts
    14

    Re: Find Data and create new list(s)

    Hah...I just did and my assumption was correct. It worked. Should have just had a little faith in myself. Thanks!

  18. #18
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Find Data and create new list(s)

    Glad you got it sorted.
    The best way to learn, is always to try it.

+ 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] Find all Orders in column, create a new list on different sheet
    By banaanas in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-09-2015, 01:04 AM
  2. Replies: 4
    Last Post: 02-06-2014, 04:02 PM
  3. [SOLVED] Find unique entries and create ranked list with formulas only
    By opheim in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2013, 04:09 AM
  4. Need Formula to find unique value and create a list.
    By want2bgr8@xl in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-28-2013, 12:27 PM
  5. Find, Replace & create new list. (Fairly urgent)
    By tautology in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 03-04-2012, 11:04 AM
  6. Create drop down list, find, copy and add cumlative total
    By Matso in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2010, 08:25 PM
  7. Replies: 3
    Last Post: 03-18-2005, 12:06 PM

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