directory

  1. M

    VBA to open MM_TEST in folder /subfolder

    Hi , I would like to open a file ie MM_Test by DIR or FSO method by searching all folders and subfolders in Directory: C/Example/ The file names can also range from 01_TEST to 12_TEST. For example , latest would currently be 06_TEST based on June. So rather than date modified, is there a...
  2. rhino4eva

    get directory names

    I have a very complicated problem that may have a simple solution I work with a biochemical analyzer which churns out copious amounts of data for quality purposes The machine outputs a directory structre which I need to explain the root of the directory is on c:\data\ each day the computer...
  3. B

    List Files Sorted Alphabetically and Grouped by Folder

    The following macro groups files by folder and produces the desired output. However, it is very slow when it runs on a large directory, like 'My Pictures' with 30,000+ files. I suspect I don't need a double loop, or perhaps I can use an array, but I am fairly new to VBA, and not sure how to...
  4. tyija1995

    Importing CSVs to Access with VBA

    Hey, I have 55 CSV files that I want to export in to Access, I am currently using a macro but it only takes the first file from the directory, I need a loop to take all of the files from the same directory but I am not sure how to implement it, any help would be appreciated. I am using the...
  5. L

    Merge and Rename Worksheets Based on Matching Cell Values

    Good morning, I have excel files in directories that I need to rename based on the value in specific cells in each worksheet and need help with a macro code to achieve this. I would like the macro to loop through the folders and rename each file based on the value it finds in the indicated...
  6. V

    VBA to check the value in all the files in directory

    Hi All, Looking for VBA code which helps in finding a value in list of files in the directory. It should fetch the filename, sheet name and address of the cell where the value holds. For instance if I want to search "December 2019" in directory which has files name say file1, file2, file3...
  7. B

    Vlookup/IF question

    how would I create a formula to lookup an ID number in column C on a US directory tab or CA directory tab if the country code in column B is either US or CA? Below are the three columns I'm using and I want the file number to look in the specific directory tab based on what country code is used...
  8. M

    Capture header rows from all Excel worksheets in a directory to a separate master file

    Hi there, I already have VBA code that will recursively trawl through a directory. I am currently using this to identify if any columns in any of the worksheets in any of the Excel workbooks within that directory contain email addresses and, if so, those columns are then deleted. Here's the...
  9. B

    VBA to print file in directory

    Hi, I need to print a file in a directory using vba. I know the file path which we can call FilePath. The difficult part is selecting the printer as the save to pdf option and selecting the destination via USB or even better skipping that dialog box all together and keeping it contained in the...
  10. M

    VBA code that opens the current folder?

    Hi I've got the code below which opens the "Downloads" folder on my laptop, after which I choose a file to import. However, I'd like to modify the code so that it opens the CURRENT folder that I'm in. E.g if the files I'm using are all saved in "My Documents", then I'd want the code to go...
  11. S

    Automatically change hyperlink

    Hi, I have a hyperlink I use and there is a cell I manually enter to put a client's names. As a result the hyperlink concatenates this to form the hyperlink. However, the directory is going to be split from A-L and M - Z. Is there a formula that can pick up the first letter of the client...
  12. K

    VBA Code to pull first 5 lines from only the first file in a directory

    Hello, I have directory with multiple excel files and I need to pull the first 5 lines of only the first file in the directory into a new sheet. Can anyone help? Thanks in advance!
  13. C

    Using Kill and "*.*" to delete all files in a folder

    Hi, I have a line of code as follows: Kill tempPath & "*.*" which works exactly as I want. I deletes all files in a temporary folder before running the rest of the macro. The problem I have is when there are no files in the directory (i.e. it's an empty directory) then I get a "Run-time...
  14. B

    VBA File Directory Issue

    I need some help I am not sure why how to get this code to run I have tried a few different things, but I just want to be able to easily change the file directory via DIM Directory = "C:\DATA" FileName = "PRNT" & i & ".DAT" DirFile = Directory & FileName ActiveWorkbook.Queries.Add Name:="PRNT"...
  15. S

    Hyperlink Formula

    Hi i am trying to setup a hyperlink formula for a file directory, normally as many people will be using this spreadsheet typically they will have saved the directory folder under different letter eg A:, C...
  16. W

    Automating HMI data transfer between data logging web server to excel spreadsheet

    I'm an engineer at a manufacturing plant who's trying to automate one of our more troublesome processes. We use an HMI system to monitor all industrial process data and export the desired data tags to a logging directory. This web server directory contains a maximum of 30 .csv files, which is...
  17. W

    Anyway to quickly switch between two directories in Microsoft excel 2010

    on the work that I have to do,I have to consistently switch between two directories. These are the steps that I do. Step 1:Press Ctrl + O.Navigate to directory 1. Open a file.Step 2: Then press Ctrl + O, navigate to directory 2. Open the file in that directory. Cut-and-paste that data from...
  18. R

    How to save to specific directory when doing ExportAsFixedFormat?

    Hello! I have a workbook with 39 tabs that need to be saved individually as PDFs. To save myself time, I created a macro that does this. Code is below. Problem is, I can't get the PDFs to be saved/exported to a specific folder consistently. I've tried a few solutions I looked up online, but...
  19. D

    Macros for editing multiple workbooks

    I have a file called DataFile.xlsm, with Sheet1, and date recorded in A1 cell. In the same directory I have number of other workbooks with date recorded on Sheet "Control", A1 cell. I'm trying to write macros to loop through all files in the same directory (or directory C:\MOS\) The aim is to...
  20. R

    Macro to hide/show & enable AutoCalc on certain sheets

    Hey guys, I have an usual vba question to ask. Is it possible to create a worksheet that acts as a directory for all the worksheets in workbook? I want to be able to use this directory to show/hide certain worksheets & also enable/disable autocalc for certain worksheets as well. I've done a lot...

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