Converting Dynamic Array Formula to VBA solution

Luke777

Board Regular
Joined
Aug 10, 2020
Messages
246
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I was recently provided with a fantastic dynamic array formula that handles the my data exactly as I want. Unfortunately, with the size of my data set, it takes far too long to calculate and recalculates unnecessarily. I would like to know if its possible to convert the formula to VBA, which I believe will speed things up if not at least avoid recalculation at inconvenient times.


C4=XLOOKUP(C1#&ROUND(A4:A10,5),Sheet1!A1:A20&ROUND(Sheet1!B1:B20,5),Sheet1!C1:C20,"")

The formula exists in C4 on Sheet2. Sheet1 is the data source, the first 20 rows of which looks like the following

28606:30:0046
21406:30:0046
153506:30:0046
158006:30:0046
130706:30:0046
102906:30:0053
5706:30:0023
28606:45:0012
21406:45:0012
153506:45:0012
158006:45:0012
130706:45:0012
93207:30:0046
53807:30:0046
93207:45:0012
54207:45:0046
53807:45:0012
54208:00:0012
24108:00:0046
98908:00:0023


The axes on Sheet2 are the uniques of sheet1 A:A transposed to Sheet2 row 1 (starting at C) & date/time in 15 minute intervals starting at 06:30 A4:A148

Basically the formula provided does the work required, just too slowly and without enough control over when it functions. I also need to edit the results at a later date e.g run a script to change a specific number to a specific string in D44 which I believe would be overwritten if the sheet recalculated.

Thanks all
 
Last edited by a moderator:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

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