Value of Array Formula into VBA

JessyD

New Member
Joined
Feb 3, 2015
Messages
13
Good afternoon,

I currently have an array formula in my workbook which basically comes down to this (which does exactly what I expect / want):
{SUM(IFERROR(((MONTH(C3:C100)=1)*(YEAR(C3:C100)=2016))*R3:R100,0))}
It calculates the sum of a range (column R) when the date (column C) contains 'January 2016'. Column C doesn't always contain a date (hence the IFERROR).

My problem is the following:
I want the value of this formula in VBA, however, I don't want to put this formula in any of my sheets. Is it possible to translate the above formula to VBA without any of my sheets containing the formula?
I succeeded with a simple for loop, but my file is a lot bigger than 97 rows, so the calculation took way too long (in comparisment, the above formula is instant when I edit it to the complete range).

Thanks in advance!
 
Last edited:

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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