cooker6583
New Member
- Joined
- Aug 17, 2016
- Messages
- 6
Hello - I am working with a 40,000+ row excel file and using an index/match array formula to assign values. The lookup ranges are fixed ranges and I'm finding that when I fill down, I'm getting #N/A errors. My formulas work with Ctrl+D fill down on a small scale/test data, but when I apply it to the large data set with Ctrl+D I get the errors.
The interesting thing is that when I manually type input code on the main file (i.e., type over the data in Column F below with the exact same entry), the formulas work.
It's like Excel isn't reading the data for some reason. In other words, I believe my formulas are accurate and this has something to do with how the array fills. I've tried a few of the basic tricks (highlight full range, then type formula, then CSE, etc) but can't break through.
Here is an example of my data and array formulas (sheet 2 is just the name of my worksheet):
[TABLE="width: 259"]
<tbody>[TR]
[TD][/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Input Code[/TD]
[TD]Input Amount[/TD]
[TD]Result[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]TT[/TD]
[TD]$1,300[/TD]
[TD]2.36[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]22[/TD]
[TD]$975[/TD]
[TD]2.65[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]22[/TD]
[TD]$400[/TD]
[TD]2.25[/TD]
[/TR]
</tbody>[/TABLE]
{=INDEX(Sheet2!$D$3:$D$44,MATCH(F3,IF(G3>=Sheet2!$B$3:$B$44,IF(G3<=Sheet2!$C$3:$C$44,Sheet2!$A$3:$A$44)),0),1)}
I've also tried eliminating the conditional if statements using the following:
{=INDEX(Sheet2!$D$3:$D$44,MATCH(1,(F3=Sheet2!$A$3:$A$44)*(G3>=Sheet2!$B$3:$B$44)*(G3<=Sheet2!$C$3:$C$44),0))}
The array I'm referencing is set up like below.
[TABLE="width: 408"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Code[/TD]
[TD]Min[/TD]
[TD]Max[/TD]
[TD]Target Result[/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D]17[/TD]
[TD]22[/TD]
[TD]$573[/TD]
[TD]$600[/TD]
[TD]2.25[/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD]22[/TD]
[TD]$600[/TD]
[TD]$814[/TD]
[TD]2.35[/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD]22[/TD]
[TD]$814[/TD]
[TD]$850[/TD]
[TD]2.35[/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]22[/TD]
[TD]$850[/TD]
[TD]$961[/TD]
[TD]2.65[/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD]22[/TD]
[TD]$961[/TD]
[TD]$999[/TD]
[TD]2.65[/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD]22[/TD]
[TD]$999[/TD]
[TD]$1,200[/TD]
[TD]2.75[/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD]22[/TD]
[TD]$1,200[/TD]
[TD]$1,300[/TD]
[TD]2.85[/TD]
[/TR]
[TR]
[TD]24[/TD]
[TD]22[/TD]
[TD]$1,300[/TD]
[TD]$1,500[/TD]
[TD]2.85[/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD]22[/TD]
[TD]$1,500[/TD]
[TD]$1,900[/TD]
[TD]2.85[/TD]
[/TR]
[TR]
[TD]26[/TD]
[TD]22[/TD]
[TD]$1,900[/TD]
[TD]$3,000[/TD]
[TD]2.85[/TD]
[/TR]
</tbody>[/TABLE]
The interesting thing is that when I manually type input code on the main file (i.e., type over the data in Column F below with the exact same entry), the formulas work.
It's like Excel isn't reading the data for some reason. In other words, I believe my formulas are accurate and this has something to do with how the array fills. I've tried a few of the basic tricks (highlight full range, then type formula, then CSE, etc) but can't break through.
Here is an example of my data and array formulas (sheet 2 is just the name of my worksheet):
[TABLE="width: 259"]
<tbody>[TR]
[TD][/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Input Code[/TD]
[TD]Input Amount[/TD]
[TD]Result[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]TT[/TD]
[TD]$1,300[/TD]
[TD]2.36[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]22[/TD]
[TD]$975[/TD]
[TD]2.65[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]22[/TD]
[TD]$400[/TD]
[TD]2.25[/TD]
[/TR]
</tbody>[/TABLE]
{=INDEX(Sheet2!$D$3:$D$44,MATCH(F3,IF(G3>=Sheet2!$B$3:$B$44,IF(G3<=Sheet2!$C$3:$C$44,Sheet2!$A$3:$A$44)),0),1)}
I've also tried eliminating the conditional if statements using the following:
{=INDEX(Sheet2!$D$3:$D$44,MATCH(1,(F3=Sheet2!$A$3:$A$44)*(G3>=Sheet2!$B$3:$B$44)*(G3<=Sheet2!$C$3:$C$44),0))}
The array I'm referencing is set up like below.
[TABLE="width: 408"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Code[/TD]
[TD]Min[/TD]
[TD]Max[/TD]
[TD]Target Result[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]11[/TD]
[TD]$0[/TD]
[TD]$500[/TD]
[TD]3.00[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]11[/TD]
[TD]$500[/TD]
[TD]$733[/TD]
[TD]3.00[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]11[/TD]
[TD]$733[/TD]
[TD]$967[/TD]
[TD]3.00[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]11[/TD]
[TD]$967[/TD]
[TD]$1,200[/TD]
[TD]3.00[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]11[/TD]
[TD]$1,200[/TD]
[TD]$1,433[/TD]
[TD]3.00[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]11[/TD]
[TD]$1,433[/TD]
[TD]$3,000[/TD]
[TD]3.00[/TD]
[/TR]
[TR]
[TD]9[/TD]
[T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