Using Frequency to count numbers but skip blanks or 0's

Status
Not open for further replies.

bramdana

New Member
Joined
Jun 26, 2014
Messages
5
Hi all.

I am running a table at work to determine who completes their work to the best standard.

I am counting the occurrences that person hits 100% continuously.

The script below works for this:
Code:
=MAX(FREQUENCY(IF($D17:$CG17=100,COLUMN($D17:$CG17)),IF($D17:$CG17<>100,COLUMN($D17:$CG17))))

Then Crtl Shift Enter

However the issue I've found is that if someone goes on holiday or has a week off the table populates a zero or a blank and this then discounts the longest streak.

100100100100100
100100100100
100100100100100

<tbody>
</tbody>

As you can see above the answer should be 5,4,5 for the longest streak of 100's However I am getting 5 3 5 because the middle guy had a holiday.

I have tried the AND statement however kept getting a value error.

Code:
=MAX(FREQUENCY(IF($D17:$CG17=100,COLUMN($D17:$CG17)),IF(AND($D17:$CG17=100,$D17:$CG17>0),COLUMN($D17:$CG17))))

Any help is appreciated please.
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Status
Not open for further replies.

Watch MrExcel Video

Forum statistics

Threads
1,122,233
Messages
5,594,964
Members
413,955
Latest member
FalcoDaz

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
Top