Last 3 results in a range

AlfUK

New Member
Joined
Jul 9, 2008
Messages
16
This is my first post so go easy on me.

I have created a spreadsheet with the backup job status for a number of servers. I would like to take the last 3 results for each backup job and then check whether the failure rate is more than 35%. I have looked through countless forums and sites trying to just find a way to find the last cell in a range, but have as yet found nothing helpful.

The status I what to check on is "FAILED".

I would like to do this by formula not VB.

Any pointers in the right direction would be greatly appreciated.

Thanks,
AlfUK
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Perhaps:

=COUNTIF(OFFSET(INDEX(A:A,MATCH(REPT("z",255),A:A)),-2,,3),"FAILED")>1

I'm only checking for greater than 1, because with only 3 results, 35% is never attainable. 1 instance would be 33 1/3%, so anything higher than 1 FAILED meets your criteria.
 
Upvote 0
Thanks HOTPEPPER it works. Diamond.

Can I throw one more thing into the equation...

Can I search for more than 1 entry. So if the cell contents are either "FAILED" or "CANCELLED".
 
Upvote 0
Try this

=SUMPRODUCT(ISNUMBER(MATCH(OFFSET(A1,MATCH(REPT("z",255),A:A)-1,0,-3),{"Failed","Cancelled"},0))+0)>1

Hope this helps.
 
Upvote 0
=SUM(COUNTIF(OFFSET(INDEX(A:A,MATCH(REPT("z",255),A:A)),-2,,3),{"CANCELLED","FAILED"}))>1
 
Upvote 0
Thanks HOTPEPPER it works great. I modified the formula slightly as I was using columns not rows.

Thanks again for your help.
 
Upvote 0

Forum statistics

Threads
1,223,981
Messages
6,175,768
Members
452,668
Latest member
mrider123

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