Dear Experts,
I've been working with a VBA macro generated using ChatGPT that filters data based on specific criteria and retrieves additional information from an external workbook using INDEX and MATCH functions. However, I've encountered an error. I suspect the error are related to the functions.
I hope someone here can assist me with troubleshooting this issue.
I have attached a sample worksheet for your reference to facilitate understanding.
Thank you in advance for your support!!!
The steps required in the VBA are as follows:
1. Filter Data: Show only the rows where:
- Column AD is empty.
- Column Z has "SMBC"
2. Check for Data: Verify if any rows match the filter criteria. If no rows match, display a message stating that no data was found and stop the process. If there is a match, proceed to step 3.
3. Formulas are applied to columns AD and AE to fetch data from this external workbook using INDEX and MATCH functions.
Which is to retrieve data from columns K and M of an external workbook based on matches in column P.
Path to an external workbook --> "R:\Shipping Group- SMBC INCOMING FUND REPORTS.xlsm".
4. Clear Filter.
5. Convert Formulas to Values: Convert the formulas in columns AD and AE into fixed values to prevent them from changing if the data in the external file changes.
![]()
Please Login or Register to view this content.
Bookmarks