How do I prevent an array formula from displaying '#NUM!'?

videozvideoz

Board Regular
Joined
Apr 1, 2011
Messages
51
Apologies, I did post this within another thread but I need an urgent answer so have raised a seperate thread for it.

How do I make my array formula not say "#NUM!"? I'd either like it to report "0" or just be blank

{=IF(ROWS(E$28:E28)>$E$2,"",INDEX(Available,SMALL(IF(Names=$C$2,IF((Available<>0)*($C$29>=Next_Date_Available),ROW(Names))),ROWS(E$28:E28))))}
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hello

Apologies, I did post this within another thread but I need an urgent answer so have raised a seperate thread for it.

How do I make my array formula not say "#NUM!"? I'd either like it to report "0" or just be blank

{=IF(ROWS(E$28:E28)>$E$2,"",INDEX(Available,SMALL(IF(Names=$C$2,IF((Available<>0)*($C$29>=Next_Date_Available),ROW(Names))),ROWS(E$28:E28))))}

This part IF(ROWS(E$28:E28)>$E$2,"", is designed to do exactly what you want.
When you say that doesn't work, then the value in cell E2 is calculated to high. E2 must be equal to the maximum value calculated inside the SMALL() function.
 
Upvote 0
The formula is copied down until #NUM! is displayed. E2 cannot be changed - the number is correct. As the formula acts as a lookup, I cannot just delete the #NUM! values as if the criteria changed in C2 then it may well turn into a value
 
Upvote 0
E2 cannot be changed - the number is correct.
It sounds like E2 is not calculated but an input.

E2 should be calculated like this:
Code:
=SUM(--((Names=$C$2)*(Available<>0)*($C$29>=Next_Date_Available)))
 
Upvote 0
As I thought, the calculation of E2 is not correct. This part is missing:
Code:
($C$29>=Next_Date_Available)
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,248
Members
452,900
Latest member
LisaGo

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