Array Formula #N/A Error | Manually Typing Over Data Gives Accurate Result

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):

FGH
Input CodeInput AmountResult
3TT$1,3002.36
422$9752.65
522$4002.25

<tbody>
</tbody>

{=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.


ABCD
2CodeMinMaxTarget Result
311$0$5003.00
411$500$7333.00
511$733$9673.00
611$967$1,2003.00
711$1,200$1,4333.00
811$1,433$3,0003.00
9TT$0$2702.20
10TT$270$4052.20
11TT$405$6702.24
12TT$670$8222.28
13TT$822$1,1642.32
14TT$1,164$1,5222.36
15TT$1,522$3,0002.40
1622$0$5732.25
1722$573$6002.25
1822$600$8142.35
1922$814$8502.35
2022$850$9612.65
2122$961$9992.65
2222$999$1,2002.75
2322$1,200$1,3002.85
2422$1,300$1,5002.85
2522$1,500$1,9002.85
2622$1,900$3,0002.85

<tbody>
</tbody>
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Try:

{=IFERROR(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),"")}
 
Upvote 0
DonnyF - thanks for the response but that just clears the cells of the #n/a. I'm getting the #n/a where I should be getting a valid result. Once I type over the Input Code, the formulas change from #n/a to the correct result...I just can't go throw 40K rows of data and manually type over every code to get the right results :(
 
Upvote 0
If manually re-typing the values in column F makes the fomula work,that indicates the values that were orignally in column F are not 'Exactly' what you think they are.

How did the values originally get into column F?
Are they the result of a formula?
Were they copy/pasted from some other source?

Perhaps they have leading and/or trailing spaces, like
" 11" or "11 " instead of just "11"
 
Upvote 0
I used an index match to pull them in from the array, then pasted them in as values to reduce the calculation burden on the worksheet. They are formatted as "General" which is the same way I formatted the codes in Column A of my array. Those were hand-typed and auto-filled.
 
Upvote 0
OK, assuming F3 is now a cell that would make the formula work if you manually retyped it's value.
Also assuming F3 is TT as shown in the sample data you posted.

BEFORE you retype the value, what do these formulas return

=LEN(F3)
=F3="TT"
 
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,827
Members
449,470
Latest member
Subhash Chand

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