Shortening a FormulaArray in VBA

Declamatory

Active Member
Joined
Nov 6, 2014
Messages
319
Hi Folks,

I have the following formula in VBA which is getting a run time error I think because the formula exceeds 255 characters. I understand there is a way of breaking up the formula and was wondering if anybody would be able to break up the following so it could run in VBA.

Thanks

Code:
Range("B17").Select
    Selection.FormulaArray = _
        "=IF(SUM(COUNTIFS(Dealing!C[2],{""A800F"",""C800F""},Dealing!C[21],""Fund Switch Purchase""))>0,""Estimate"",IF(OR(SUMIF(Dealing!C[2],""A800F"",Dealing!C[5])<>0,SUMIF(Dealing!C[2],""C800F"",Dealing!C[5])<>0),""Estimate"",IF(ABS(R[-3]C+R[-3]C[3])=0,""No dealing for ""&TEXT(R[-6]C[-1],""dd/mm/yyyy""),""Confirmed"")))"
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi, that formula does not need committing as an array formula. So you can just use:

Range("B17").FormulaR1C1 = "=IF(....
 
Upvote 0

Forum statistics

Threads
1,215,440
Messages
6,124,882
Members
449,193
Latest member
PurplePlop

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