# array "formula maybe too long" excel 2007

#### standaman7

##### New Member
afternoon,

i have the formula below to pull from an array. the problem is that the data im using for the array contains 20000+ rows. The function works fine for about the first 10 lines and then i get random data that is pulled from my data source. any help?

{=IF(ROWS(\$C2:\$C2)>\$A2,"",INDEX('XX File'!\$A\$2:\$A\$29428,SMALL(IF(('XX File'!\$F\$2:\$F\$29428<='Input'!\$A2)*('XX File'!\$G\$2:\$G\$29428>='Input'!\$A2)*('XX File'!\$A\$2:\$A\$29428='Input'!\$B2),ROW('XX File'!\$A2:\$A29428)-ROW('XX File'!\$A\$2)+1),ROWS(C2:C2))))}

### Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

#### Robert Mika

##### MrExcel MVP
afternoon,

i have the formula below to pull from an array. the problem is that the data im using for the array contains 20000+ rows. The function works fine for about the first 10 lines and then i get random data that is pulled from my data source. any help?

{=IF(ROWS(\$C2:\$C2)>\$A2,"",INDEX('XX File'!\$A\$2:\$A\$29428,SMALL(IF(('XX File'!\$F\$2:\$F\$29428<='Input'!\$A2)*('XX File'!\$G\$2:\$G\$29428>='Input'!\$A2)*('XX File'!\$A\$2:\$A\$29428='Input'!\$B2),ROW('XX File'!\$A2:\$A29428)-ROW('XX File'!\$A\$2)+1),ROWS(C2:C2))))}

{=IF(ROWS(\$C2:\$C2)>\$A2,"",INDEX('XX File'!\$A\$2:\$A\$29428,SMALL(IF(('XX File'!\$F\$2:\$F\$29428<='Input'!\$A2)*('XX File'!\$G\$2:\$G\$29428>='Input'!\$A2)*('XX File'!\$A\$2:\$A\$29428='Input'!\$B2),ROW('XX File'!\$A2:\$A\$29428)-ROW('XX File'!\$A\$2)+1),ROWS(\$C\$2:C2))))}

#### standaman7

##### New Member
That adjustment for the formula worked for the first line and then after, i got #NUM!. the first part of the formula "IF(ROWS(\$C2:\$C2)>\$A2,"" is a reference to the below sumproduct, dont know if that helps:

=SUMPRODUCT(('XX File'!\$F\$2:\$F\$29428<='Input'!\$A2)*('XX File'!\$G\$2:\$G\$29428>='Input'!\$A2)*('XX File'!\$A\$2:\$A\$29428='Input'!\$B2))

#### Robert Mika

##### MrExcel MVP
You need to lock this as well:
IF(ROWS(\$C\$2:\$C2)>\$A\$2

Replies
0
Views
103
Replies
4
Views
401
Replies
7
Views
198
Replies
2
Views
211
Replies
1
Views
103

1,195,679
Messages
6,011,119
Members
441,585
Latest member
MargaretBartley

### 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.

### Which adblocker are you using?

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

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