Array, #VALUE1,

Alleemq

New Member
Joined
Apr 21, 2015
Messages
5
Hi All,

I have an issue that I am unable to shake off. I require an array to give me the earliest maturity date based on two criteria. Going forward, I also want to be able to get 2nd earlist maturity and 3rd earliest maturity.

Entity NamePay or ReceiveMaturity date
APPLERECEIVE6/11/2017
APPLERECEIVE27/11/2017
APPLERECEIVE27/12/2017
APPLERECEIVE16/01/2018

<tbody>
</tbody>

I've played with a few prototypes below:

ValueFormula
6/11/2017+SMALL($H$114:$H$118,1)
6/11/2017{=SMALL(IF(G114:G118="RECEIVE",H114:H118,"OOOO"),1)}
6/11/2017{=SMALL(IF(F114:F118="APPLE",H114:H118,"OOOO"),1)}
#VALUE!{=SMALL(IF(AND(G114:G118="RECEIVE",F114:F118="APPLE"),H114:H118,"OOOO"),1)}

<tbody>
</tbody>

<tbody>
</tbody>

If I use one cirteria only, it works fine. I need to have two criterias as my bigger file have multiple columns, and the last value/formula is where I am stuck.
Also, though the current formula says 114-118 (which includes blanks); my bigger files will be formulae changed to columns eg G114:G118 will become G:G and this will obviously have blanks .

Any help/advise on this will be appreciated.

Thank you

AQ
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi, first of all, while you are using an Array formula, you have to avoid AND() OR() function and use * for AND and + for OR.
 
Upvote 0
#VALUE!{=SMALL(IF(AND(G114:G118="RECEIVE",F114:F118="APPLE"),H114:H118,"OOOO"),1)}

<tbody>
</tbody>

<tbody>
</tbody>

Hi, try like this:

{=SMALL(IF(G114:G118="RECEIVE",IF(F114:F118="APPLE",H114:H118)),1)}
 
Upvote 0
Hi,

As noted by Faysal you can combine several criteria for the IF function (as many as you want) with multiplication. The product of boolean variables will only be TRUE if all multiplied elements are TRUE.

This may be preferable to nesting IF formulas because you can more conveniently use any number of criteria, including one for example to only consider non-blanks, etc...

{=SMALL(IF((A:A="APPLE")*(B:B="RECEIVE")*(A:A<>""),C:C),1)} --- just continue listing criteria by adding statements in ()
 
Upvote 0
This may be preferable to nesting IF formulas because you can more conveniently use any number of criteria

Hi, just a note - as I understand it, nesting is the more efficient method, especially as the number of criteria increases (if such things are important).

Also full column references should be widely avoided with either of these type of formula.
 
Upvote 0

Forum statistics

Threads
1,215,982
Messages
6,128,100
Members
449,420
Latest member
AussieHobbo

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