Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1049879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:41:08+00:00 2026-05-16T16:41:08+00:00

I have a folder with several excel files that have a date field, i.e.

  • 0

I have a folder with several excel files that have a date field, i.e. 08-24-2010-123320564.xls. I want to be able to have some VB scripting that will simply take the files that start with todays date and merge them into one file.

08-24-2010-123320564.xls
08-24-2010-123440735.xls
08-24-2010-131450342.xls

into

08-24-2010.xls

Can someone please help?

Thanks

GabrielVA

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:41:09+00:00Added an answer on May 16, 2026 at 4:41 pm

    assuming you just want to append rows in simple spreadsheets, follow this logic:

    • Psuedocode
      • use an excel macro
        • (you could just as well automate excel from vb but why vbscript alone since you need excel anyway?)
      • have it to a dir listing (dir function)
      • dim a date_start variable init to “new”
      • dim a merged_spreadsheet as new doc default to nothing
      • loop thru result of dir
        • if date_start <> start of filename
          • if merged_spreadsheet is not nothing
            • save it
            • set it to nothing
          • store start of date (left mid function) in date_start
        • if merged_spreadsheet is nothing
          • make a new one
        • open the file from the dir command’s loop
        • select all the data
        • copy it
        • go to first empty row in merged_spreadsheet
        • paste it
      • loop files
      • if merged_spreadsheet is not nothing
        • save it

    If you’re not happy with all those ‘nothings’, you can set a separate flag to keep track of whether you have a merged_spreadsheet or not. Think about what happens for just one file in a date, no files at all, etc.
    Of course you will tear out your hair finding out how to automate those excel functions. The secret to turning ‘hard’ into ‘pretty darn easy’ is this:

    macro recorder will reveal the automation commands

    They are not intuitive. So record a macro. Then do things that you’ll need to do in your code. Stop recording and look at the result.

    For example:
    * load/save files
    * select only entered fields
    * Select all
    * copy / switch files / paste
    * create new sheet
    * click in various single cells and type (how to examine/set a cell’s contents)

    In summary-
    (1) Know exactly the steps to what you’re doing
    (2) Use macro recorder to give away the secrets of the excel object model. Steal its secrets.

    Really this won’t be all that hard if you marry these two concepts cleverly. Since the macro will be vbscript (at least if you use office 97 😉 you can probably run it from vbs or vb6 if you want. A hop to vb.net shouldn’t be that hard either.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.