Complex excel calculation with a small problem

tmman

New Member
Joined
Aug 26, 2015
Messages
8
Hi All,

I have, at least what I consider, a complex calculation that I have discovered a small error in... problem is, I can't figure out how to solve it. It's driving me crazy!

I have the following table:

COL BCOL CCOL DCOL ECOL F
No.NameViewsFailsSuccess Rate
1Name136-100%
2Name136-100%
3Name3267825723.96%
4Name414842.86%
5Name59277.78%

<tbody>
</tbody>


The calculations are as such, for the first row:

Name column:
=INDEX($N$5:$N$812,AGGREGATE(14,6,(ROW($AF$5:$AF$812)-ROW($AE$5)+1)/($AF$5:$AF$812=F14),COUNTIF($F$14:F14,F14)))

This same column for the 2nd row would look something like:
=INDEX($N$5:$N$812,AGGREGATE(14,6,(ROW($AF$5:$AF$812)-ROW($AE$5)+1)/($AF$5:$AF$812=F15),COUNTIF($F$14:F15,F15)))

etc...

Views:
=VLOOKUP($C14,$N$5:$AD$812,16,FALSE)

Fails:
=VLOOKUP($C14,$N$5:$AD$812,17,FALSE)

Success Rate:
{=SMALL(IF(($P$5:$P$812="JSP")*($O$5:$O$812=MAX($O$5:$O$812)),$AF$5:$AF$812,""),B14)}

These equations should search a table of items and list the top 5 with the lowest success rates. For the most part, it works. However, when 2 items have the exact same success rate, it fails. As you see in the table above, #1 and #2 are both the same. Column N contains the item name, Column O contains the date (2 dates per item), P contains the item type, AC is total views, AD is total fails, and AF is the success rate for that item.

The actual data for #1 (or #2), should be:
Name2, 1, 2, -100%

But because the percentage is the exact same as #1, it is pulling that item again and skipping over #2 completely. I am hoping someone can First, make sense of this madness and Second, be able to provide some type of tweak to my equation to help alleviate this issue.

Any help is greatly appreciated!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Rather than sorting on SuccessRate, try sorting on SuccessRate+(ROW/100000). This will turn duplicate SuccessRates into unique values.

Note that SUMPRODUCT(--(A1:A100=A1)) returns the same as COUNTIF(A1:A100, A1), so
SUMRPODUCT(--((A1:A100+ROW(A1:A100)/1000)=(A1+ROW(A1)/1000)) would be used as a replacement.
 
Last edited:
Upvote 0
So, the item name (COL C) equation would turn into:...?

=INDEX($N$5:$N$812,AGGREGATE(14,6,(ROW($AF$5:$AF$812)-ROW($AE$5)+1)/($AF$5:$AF$812=F15),SUMPRODUCT(--(($AF$5:$AF$812+ROW($AE$5:$AF$812)/1000)=($AF$5+ROW($AE$5)/1000))))

Does that sound about right?
 
Last edited:
Upvote 0
I don't understand your formula and can't comment on it.

I was passing along the Value >> Value+ROW/1000 trick to separate equal integer values. Looking at your data again, you'll have to use ROW/100000 to get below the .1% "grainy-ness" of your data.
 
Upvote 0
Thank you for the advice. I will see if I can't make it work somehow. Again, appreciate you taking the time!
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

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