Hi, I want to copy email subject that meets certain criteria from Microsoft Outlook to Microsoft Excel.
Every day I have an excel file with the name "Office Running Sheet - dd-mm-yy"
So every day I will have an excel file with different file name but with the above format. This file will be always in the same folder location. Excel file attached.
Data copied from Outlook will be paste into Column N starting from Row 21.
Please Note:
1. The excel file is actively used every second, we use autofilter a lot, sorting and hiding rows, will this be a problem?
2. If Excel file is active or in say 'F2' mode, macro can check Excel's status and, if busy, it can add a recurring task in Outlook to export the data to Excel. Whenever, macro detects that Excel is free, it can send the data.
3. There will also a manual data entry to the excel file that is also very active, around 7 manual data entry every minute. So the code will need to check the cells left to it. Example: before putting a data to cell N21, it needs to check if cell B21 to M21 is empty? if yes then put the data. if not, then go to cell N22, and check again if cell B22 to M22 is empty? if yes, then put the data. If not, then go to cell N23, and so on.
4. I need a button or something that can switch this code off instantly, just in case things go wrong.
You can write a macro on my excel, or on my outlook, or use another plugin, or whatever. Up to you as long as this goal is accomplished.
Criteria on Email Subject to be copied:
- If the first 3 letters are POS
- If the first letter is R then followed by 3 digit numeric number. Example: R261
- If the first letter is W then followed by 3 digit numeric number. Example: W410
- If the first letter is D then followed by 3 digit numeric number. Example: D201
I want the code to be dynamic so that in the future I can set my own criteria.
Thanks,
Bryan