+ Reply to Thread
Results 1 to 14 of 14

Matching values for a check

  1. #1
    Registered User
    Join Date
    11-19-2020
    Location
    united states
    MS-Off Ver
    2016
    Posts
    12

    Matching values for a check

    I need to create a macro the looks at a list on a sheet and then matching them to a list pulled from a given folder and only display the missing names from the list in a user form list box.
    The image attached is of the mater list.
    Please Login or Register  to view this content.
    This code pulls all the current files from the given folder.

    Screenshot (3).png
    So i am created a check to make sure the files have been saved.
    looking at the image "check1" list all the files that i need to look for at that time an "check 2" is later.
    the image gives the example names and the static names. You can only search by the names listed as the has a random portion in the name.
    so in short i need help making a macro the looks at the list in "G" them compares it to "DirectoryListArray" if the value is missing it will display the "correct Name" in the list box of the user form.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Matching values for a check

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

  3. #3
    Registered User
    Join Date
    11-19-2020
    Location
    united states
    MS-Off Ver
    2016
    Posts
    12

    Re: Matching values for a check

    thank you for your response but am I missing something as when i run the macro i just end up with a blank message box?

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Matching values for a check

    It would mean that there were no matches found. Can you attach a dummy file with both the Data List and a worksheet with the expected results?



    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    11-19-2020
    Location
    united states
    MS-Off Ver
    2016
    Posts
    12

    Re: Matching values for a check

    here is the file example let me know if you have other questions the list should appear in the userform called "MISSING"
    Attached Files Attached Files

  6. #6
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Matching values for a check

    Can the files listed in column 2 be found in the path or is it the files listed in column 3?

  7. #7
    Registered User
    Join Date
    11-19-2020
    Location
    united states
    MS-Off Ver
    2016
    Posts
    12

    Re: Matching values for a check

    both the column 2 and 3 contain the static part of the file name.
    for example if a file that gets saved every day is : "test(unique identifier).pdf like if it is saved today it would be "test5652.pdf" but tomorrow is saved as "Test86594.pdf". If i want to know if the file is there the macro can only look for a file that begins with "test" not the whole name as I wont know that until after the file is saved.
    another example
    gibyroom3835278.pdf (is the file saved today)
    gibyroom3529658.pdf (is the file saved tomorrow)
    gibyroom (is the part of the name that can be searched for on any day)

    When the macro finds a file name containing "gibyroom" nothing is returned to the userform listbox.
    When the macro dose not find a file name containing "gibyroom" the macro returns "Guest IN House.pdf" to the userform listbox
    all the names are found in the data list tab as new files may need to be added or removed in the future but all the information can be pulled from there.
    Please let me know of you have any other questions.

  8. #8
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Matching values for a check

    A small change...
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    11-19-2020
    Location
    united states
    MS-Off Ver
    2016
    Posts
    12

    Re: Matching values for a check

    for some reason it is still displaying nothing when i know files are missing what more information would you need to help get this working right?

  10. #10
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Matching values for a check

    Try changing this line
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    11-19-2020
    Location
    united states
    MS-Off Ver
    2016
    Posts
    12

    Re: Matching values for a check

    ok I got it working with that change my last hurtle is that i need the list to display the missing files not the ones there. What do I need to do to flip the results to show only the missing ones? I really thank you for all your help as i really would have been able to do it without your help.

  12. #12
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Matching values for a check

    Not sure, but try this version...
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    11-19-2020
    Location
    united states
    MS-Off Ver
    2016
    Posts
    12

    Re: Matching values for a check

    that version generates an error 424 object required

  14. #14
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Matching values for a check

    Once more unto the breach...
    Please Login or Register  to view this content.

+ 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. Matching cell values to check for duplicates or not
    By farm58 in forum Excel General
    Replies: 5
    Last Post: 08-06-2018, 03:53 PM
  2. Replies: 7
    Last Post: 09-16-2017, 11:58 AM
  3. [SOLVED] matching check
    By okl in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-18-2016, 09:46 AM
  4. [SOLVED] Help - Need to check a workbook for matching multiple values
    By sx200n in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-03-2014, 09:22 AM
  5. possible to check for file in multiple folders, then check for values in specific cells?
    By mattheritage in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2014, 08:33 AM
  6. [SOLVED] Return cell values for non-matching & matching criteria
    By jenz_skallemose in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-13-2012, 11:52 AM
  7. [SOLVED] Check for matching values and list the lapsed rows under the appropriate heading
    By sans in forum Excel Programming / VBA / Macros
    Replies: 35
    Last Post: 05-07-2012, 02:31 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