Macro - Date and data analysis....

petry_37

New Member
Joined
Jan 19, 2007
Messages
23
Hi, I am analysing a bunch of file data and due to the large volume of data the sorts and filters take ages to run.

Column B contains the size of the files in bytes.
Columns D, E and F contains their last access, date created and last modified dates.
Column H contains the file extension.

I would like to be able to do the following -

Insert a new column after each of those mentioned above.

Change column B to reflect Megabytes as opposed to bytes((B2\1024)\1024).
In the new column C, analyse the data in column B into the following categories - <1MB, 1-10MB, 10-100MB, 100-500MB, 500MB-1GB, >1GB.

In the new columns after D, E and F analyse the date data into categories, just show the years if the dates are in the last 5 years, older than 5 years for those dates between 2002 and 2005 inclusive, older than 10 years for those dates between 1992 and 2001 inclusive, older than 20 years for those dates between 1982 and 1991 inclusive, older than 30 years for those dates earlier than 1981.

Finally do a lookup in the new column afer column H to get the actual name of the file extension(I have a basic list of file extension names).

I realise this is quite a task but any help would be much appreciated! I can manipulate code but writing it from scratch is a bit of a stretch for me....

Many thanks!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Are you sure that you want to do this with a macro?
I would have thought that this could be achieved with a formula in one column and a pivot table, perhaps with a calculated field or two.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,775
Members
452,353
Latest member
strainu

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