+ Reply to Thread
Results 1 to 5 of 5

Help modifying a batch processing Macro

  1. #1
    Registered User
    Join Date
    04-15-2014
    Location
    Edinburgh, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question Help modifying a batch processing Macro

    Hello, I am new to using the macro function in excel, and would greatly appreciate help creating a function to batch process my data. I have a directory of text files which I would like to import into excel in order, and then to automatically produce the average and mid point for each column (for each file individually). I have attached the script for running two files individually (another tricky bit is to note that the files all have the same columns, but are variable in rows). I don't know where to begin to get it to batch process the thousands of files I have.

    I greatly appreciate your help!

    Please Login or Register  to view this content.
    Last edited by a_stansbury; 04-15-2014 at 01:33 PM. Reason: Starting/ending code

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help modifying a batch processing Macro

    Hi, and welcome to the forum. Unfortunately your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    When you've edited the code we'll need to know whether your thousands of files are all in the same directory/folder and are all the ranges you're wanting to average all in the same cell positions?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    04-15-2014
    Location
    Edinburgh, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Help modifying a batch processing Macro

    Many apologies, thank you for bringing this to my attention.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help modifying a batch processing Macro

    Hi,

    Thanks for the edit.

    What's the answer to the other questions in post #2 and in addition once the macro has worked out the statistics for each file, what do you want to do with them? Are you wanting to list then somewhere, and if so where. It's not at all obvious from your macro recorded code.

  5. #5
    Registered User
    Join Date
    04-15-2014
    Location
    Edinburgh, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Help modifying a batch processing Macro

    Hi Richard, the files are all in the same directory, labelled numerically (ideally they would be processed in numeric order).

    To help visualize the data, I have attached the worksheet. Column A ('Call') is the file name, column B-F are from the text files that are inputted into excel, column G-K should be the averages of B-F for each file, and column L-P should be the middle sample from the text set (column B is 'time', so taking the middle reference time).

    The averaged and middle values will be transferred and analyzed using R.

    example data sheet output.xlsx
    Last edited by a_stansbury; 04-15-2014 at 02:55 PM.

+ 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. Sheet-related processing causes Excel VBA Userform to stop processing Tab/Enter
    By Joaquin M Lopez Muno in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-22-2014, 03:02 PM
  2. Help finding a "batch processing" technique for a userform???
    By WillRn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2005, 10:05 AM
  3. Open Batch File For Processing
    By Chuckles123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-15-2005, 09:05 AM
  4. excel batch processing
    By anwarbham in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-18-2005, 12:09 PM
  5. how to batch processing excel worksheet modifications?
    By neptune in forum Excel General
    Replies: 4
    Last Post: 01-13-2005, 05: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