# Array MIN that ignores zeros

#### Silverjman

##### Board Regular
{=MIN((\$A122=\$A\$2:\$A\$2841)*\$S\$2:\$S\$2841)}
Column A is names S Dates so the result of this formula is Jan1901 or 0. COUNTIFS don't work in array formulas, correct? So I can't use SMALL(XXXXXXXX,COUNTIFS(XXX,0)+1)

I'm trying to find the first date a name appears...Mucho thanks!

### Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

#### gsistek

##### Well-known Member
Try using
{=MIN(IF(\$A\$2:\$A\$2841=\$A122,\$S\$2:\$S\$2841,9E+307))}

*Array entered formulas are entered using CTRL-SHIFT-ENTER instead of just ENTER. If done correctly, Excel will insert the curly braces around your formula.

#### barry houdini

##### MrExcel MVP
Try it like this:

=MIN(IF(\$A122=\$A\$2:\$A\$2841,\$S\$2:\$S\$2841))

#### Mike LH

##### Well-known Member
Hi,

Try this, it's an ARRAY so ctrl+shift+enter

=MIN(IF(A2:A2841=A122,IF(S2:S2841>0,S2:S2841)))

#### Silverjman

##### Board Regular
AHHHHHH THANKS Mike, I danced around that for an embarrassingly long time but was not going to get it, now I can sleep tonight!

Gsistek I am very confused by the "9E+307" I tried hard to get it to work for the range but alas

Barry, I had been trying that earlier to no avail

Thanks ALL, your generosity is/was much appreciated!!!!!!!!!!!!!!!

Replies
8
Views
78
Replies
10
Views
715
Replies
5
Views
149
Replies
6
Views
125
Replies
0
Views
96

Threads
1,128,107
Messages
5,628,729
Members
416,333
Latest member
Time2Learn

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

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