VBA can of course do it, but it is also possible to do with formulas.
See workbook.
The used path should automatically adjust, as long as both workbooks are in the same folder.
It will also work with the UKDR workbook closed, but faster when open.
I have set it to use 200 rows in UKDR.
If there are many rows in UKDR, calculation speed can be improved by making a column for the row specification, so the row search in UKDR is only done once per row in CDR.
But
The data in UKDR is initially copied and pasted from a csv file.
Then it would be much better to import the csv file into a sheet in the CDR workbook, and then reference the imported range in the formulas.
Excel automatically adjust ranges in formulas when new data is imported.
Upload a csv file and I will set up the import and the formulas, if you want that. CDR.xlsm
PWM16
ASKER
Hi Ejgil
Thanks for the reply.
Given the data in CDR Cols A : BN is updated daily ie cleared and new data brought in I think it will be okay to use formulas as you have done here.
I doubt the maximum number of rows required would ever exceed 1400 so it is not a huge workload for the Workbook.
I like your idea of placing the UKDR sheet in the CDR file itself so I will place a sheet and the data in the CDR file and upload it again. The data in the UKDR sheet will also be cleared and updated daily.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
See workbook.
The used path should automatically adjust, as long as both workbooks are in the same folder.
It will also work with the UKDR workbook closed, but faster when open.
I have set it to use 200 rows in UKDR.
If there are many rows in UKDR, calculation speed can be improved by making a column for the row specification, so the row search in UKDR is only done once per row in CDR.
But
Then it would be much better to import the csv file into a sheet in the CDR workbook, and then reference the imported range in the formulas.
Excel automatically adjust ranges in formulas when new data is imported.
Upload a csv file and I will set up the import and the formulas, if you want that.