finding the rightmost zero

Weaver

Well-known Member
Joined
Sep 10, 2008
Messages
5,197
On a sheet, Columns d - j represent financial years, the headers being in row 4

From row 5 downwards each column shows number of failures for the given period, with one row per asset.

The task is to determine the most recent period with a zero result and show in column N

I used the following array formula which works but nobody else in our organisation really understands array formulas (or anything beyond a sum() for that matter) so would like to replace it with something that doesn't use arrays. We rules out match (data isn't sorted) and hlookup (finds the first zero, no good if there's more than 1)

Any ideas?

Code:
=IF(MIN(D5:K5)> 0,"No Fail",OFFSET($A$4,0,MAX((D5:K5=0)*COLUMN(D5:K5))-1,1,1))
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
How about:
=IF(MIN(D5:K5)> 0,"No Fail",LOOKUP(2,1/(D5:K5=0),$D$4:$K$4))
 
Last edited:
Upvote 0
That's great, thanks.

Now that I think of it, I remember seeing something along these lines on here a year or so ago (i.e using the lookup() that forces a division by zero.)
 
Upvote 0

Forum statistics

Threads
1,224,558
Messages
6,179,512
Members
452,920
Latest member
jaspers

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