Script VBA code to search Name list into Windows Folder

Vandermeer

New Member
Joined
May 19, 2022
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Hello,

First of all, i'm a real novice about VBA code. I looked into alot of forum to find an answer for my question but i couldn't figure out how the code work.
My issue is very simple but coding this seems to be complicated (for me...).
I'm looking exactly a simple script that allows me to search all names files through a name list in Excel cells.

For example :

My excel has a column A :

A1 to A6, i have in the following cells : Burger, Banana, Strawberry, Apple, Orange, Ananas

In my Windows folder :

I have a following files.txt content named : Burger, Tacos, Plant, JoeBiden, Bed, PineApplePen, Banana, Strawberry, Apple, Orange, Ananas,

My result :

I want Excel to check cells A1 to A6 all the names and select/show me all files.txt that have these names only (Burger, Banana, Strawberry, Apple, Orange, Ananas).

Best Regards,
Vandermeer
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi Vandermeer,
welcome to the forum. First of all, this is a "help me writing this macro, this is where I am stuck" forum, not a "write this macro for me for free" forum. So given that you're a VBA novice, I assume you're enthusiastic about learning VBA. If you haven't found material yet, see e.g. Free VBA Training Course , Excel VBA Programming - a free course for complete beginners , a good Udemy course or e.g. WiseOwl.

Getting to your question, the first step is to transform that into pseudo-code:
Hope that gets you started, don't hesitate to post your attempt here if you get stuck.
Cheers,
Koen
 
Upvote 0
Hi Rijnsent,

Thank you very much for your answer. I will take a look on it.

Best regards,
Vandermeer
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,739
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top