Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Extraction files names for each sheet based on modified date

0

Hello,

I need add new sheets and rename based on modified date for month and year . so should rename sheets  by month and year as show in the file after that every sheet will extract files names for each sheet based on modified date and should sum numbers when the numbers contain like this "#,##.00

I put expected result for two sheets and will finish up to DEC-2025.

thanks.

Answer
Discuss

Discussion

Kalil

As far as I can see, you haven't tried to make a solution to your problem- all you have done is to attach my file/ code from your previous Question (and said what output you'd like.

You should see the Forum as a place to help when you get stuch, not somewhere you say "this is what I want" and leave us to meet your needs.

Also, I already advised again using the period mark in Windows file names but it looks like you are embedding invoice values in your filenames (and expect us to sort, extract and sum those values).

Please make an attempt to build on what I produced then return when you get stuck reaching your goal.



John_Ru (rep: 6722) May 16, '25 at 7:02 am
understood John.
Kalil (rep: 44) May 17, '25 at 8:35 am
Thanks Kalil. Your file naming isn't clear to me (e.g. "QWER45 5,000.00 RECEIVED) but if spaces are used to separate the value then (as a start) you might be able to use MID and INSTR (plus INSTRREV) to extract the number string.

I don't know RoyC (new to the Forum) but he may provide a solution for you but you should try yourself (since even mistakes mean that you learn more).
John_Ru (rep: 6722) May 17, '25 at 9:40 am
Add to Discussion

Answers

0

From what I can see, your code lists the path of all the files in a folder and subfolder and the filename. What do you want to change?

Discuss

Discussion

hi,
explenation doesn't seem to be clear for you!
ok here start gain
instead of populate all of files in one sheet I would to be for multiple sheets .

every sheet should link with month for year based on modified date for each file name  . if the year is 2025 then will add sheets from JAN-2025 to DEC-2025 without repeat adding sheets names for  the same month (just replace data for sheet have already is existed)  and every sheet will populate files names in column B is relating with month based on modified date. after populate files names in column B without extension as original code does it, then  will sum amounts contain format like this #,##0.00 and put sum word in lastrow for column A .
Kalil (rep: 44) May 15, '25 at 7:01 am
@royC

When using this Forum, please seek clarification using the Discussion under the Question. Kindly reserve Answers for actual (/potential) solutions to a User's Question.
John_Ru (rep: 6722) May 15, '25 at 10:34 am
The simplest way would be to leave the download as is, then split the resulting list to the separate sheets.
royC (rep: 10) May 16, '25 at 3:27 am
@Kalil

Please see the Discussion under your Question.
John_Ru (rep: 6722) May 16, '25 at 7:03 am
that means writing a new code , right RoyC?
you need modified date column to split multiple months based on modified date.
if you can do that I don't mind.
Kalil (rep: 44) May 17, '25 at 3:26 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login