File size comparison?

TheWennerWoman

Active Member
Joined
Aug 1, 2019
Messages
270
Office Version
  1. 365
Platform
  1. Windows
Hello.

Every month, my company download from a third party approximately 200 Excel files and save them in a folder. For July, this folder path would be "\\andromeda\2022\kantar downloads\July\". A macro then runs some code written by Ron De Bruin (genius) to merge all 200 files onto a single worksheet in a master file. After this another macro gets to work on manipulating the data.

June's files would be saved in "\\andromeda\2022\kantar downloads\June\".

The filenames are the same each month and each file is probably 15kb - 20kb in size.

Sometimes, the files downloaded are not correct (insofar as the filesizes are a lot more than 15kb - 20kb). We then have to flag it with the third party to correct the error.

Is there a way that, before Ron De Bruin's code starts it's work, I can compare each file for July against the June equivalent and flag it if, say, there is a 300% difference in filesize?

Many thanks for reading!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Maybe you could make use of something like the below:
VBA Code:
Sub test()
    Debug.Print FileLen("C:\Users\jbloggs\Desktop\test\img4.png") * 0.0009765625
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,700
Members
448,979
Latest member
DET4492

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