Why this doesn't work in VBA?
.Cells(1, 1).FormulaArray = "=IF(ROWS(ca$27:ca27)<=$ba$1,INDEX(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$d$2:$d$8000,SMALL(IF(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$A$2:$A$8000=$BM$2,IF(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$p$2:$p$8000=$BN$2,IF(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$w$2:$w$8000<>$BO$2,IF(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$I$2:$I$8000=$BP$2,ROW(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$d$2:$d$8000)-ROW(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$d$2)+1)))),ROWS(ca$27:ca27))),"""")"
If instead of this - \\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!
i add only this - [CutList2.xlsm]Pre! (when file CutList2.xlsm is open)
then all is ok.
Where is a problem?
.Cells(1, 1).FormulaArray = "=IF(ROWS(ca$27:ca27)<=$ba$1,INDEX(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$d$2:$d$8000,SMALL(IF(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$A$2:$A$8000=$BM$2,IF(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$p$2:$p$8000=$BN$2,IF(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$w$2:$w$8000<>$BO$2,IF(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$I$2:$I$8000=$BP$2,ROW(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$d$2:$d$8000)-ROW(\\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!$d$2)+1)))),ROWS(ca$27:ca27))),"""")"
If instead of this - \\LVSERVER\Company\Production\Razosana\Jaunie\[CutList2.xlsm]Pre!
i add only this - [CutList2.xlsm]Pre! (when file CutList2.xlsm is open)
then all is ok.
Where is a problem?