PQ - Get total from latest file in folder and store amount as that month (based on file date)

Melimob

Active Member
Joined
Oct 16, 2011
Messages
396
Office Version
  1. 365
Hi, in PQ I need to:
1) go to onedrive folder and look for latest file (format of file name will be: "Pipeline.DD-MMM-YY.csv"
2) check if MMM-YY is already present, if yes, do nothing, if no, get latest MMM-YY, sum column P called TOTAL in file and store that amount in a table against MMM-YY.

This is basically to get the pipeline amount recorded for the coming month and is based on when the report is run.

I have found how to get latest file etc. but not to test if I already have that data there and to avoid overriding the previous months.

All ideas welcome. thank you
Melissa
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
why bother to check. Simply run the query to check all files in the folder and recreate the table using the query to calculate the figure for each month (use the Group function). Provided no one changes the data in the file the information will remain correct.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,698
Messages
6,173,897
Members
452,536
Latest member
Chiz511

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