VBA FormulaArray Runtime Error

johanssson

New Member
Joined
Sep 27, 2013
Messages
25
Hi all,

Have been stucked in a formula for hours now, cant really figure out what i'm doing wrong in this formula, maybe several mistakes by me or maybe something little hat i just missed:

Range("T" & rng.Row).Select
Selection.FormulaArray = "=IFERROR(INDEX(Tabell_Tidsrapport.accdb15[Effektiv tid E];MATCH(TidRapp_Expo!B28&TidRapp_Expo!K28;Tabell_Tidsrapport.accdb15[Date2]&Tabell_Tidsrapport.accdb15[Anställnings Nr:];0));"""")"


What it basically should do is to select the column T in my range.row and insert an arrayformula
Error message is :

Run Time Error '1004'
Unable to Set the FormulaArray Property of the Range Class

the formula itself works in the worksheet but i need to add it via a macro.:confused::confused:

 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Does it work if you replace the ; with , in the formula?
 
Upvote 0
No, I'm running a Swedish version of excel so i have just changed the ISERROR & MATCH for easier understanding.
Swedish excel versions use ; instead of ,
INDEX is the same in SWE and ENG version.
 
Upvote 0
I know the Swedish version of Excel uses ; instead of , but VBA can sometimes be a bit US-centric.

Have you tried using , instead of ; and the US versions of the functions?
 
Upvote 0
Maybe one more issue.
The code put the formula correctly into correct cell.
Problem is that i need to click on each cell afterwatd Ctrl-Shift + ENTER even if there is an array formula that has been copied to correct cell.

in cells it just says #NAME?

Blad14.Range("T30").Select
Selection.FormulaArray = "=OMFEL(INDEX(Tabell_Tidsrapport.accdb15[Effektiv tid E],PASSA(TidRapp_Expo!B30&TidRapp_Expo!K30,Tabell_Tidsrapport.accdb15[Date2]&Tabell_Tidsrapport.accdb15[Anställnings Nr:],0)),"""")"
 
Last edited:
Upvote 0
Did you try replacing OMFEL with IFERROR, PASSA with MATCH etc?
 
Upvote 0
No problem.:)

I think you can use your own local settings/formula names for 'standard formulas' by using FormulaLocal and FormulaR1C1Local but I can't find an equivalent for array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,543
Messages
6,120,123
Members
448,947
Latest member
test111

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