Max frequency for consecutive text multiple condition

yogeshDD

New Member
Joined
Apr 27, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi

I need the formula for max frequency or similar to this, Problem statement is - I have an attendance record of 1 month in which I need to calculate a repeated occurrence. let's say.. if Mr. ABC is present (P) from 1-April to 7 April, and then on his Week off day he was present then the outcome for the present should be 8.

I'm using this formula but it is giving me output only for P

ArrayFormula((MAX(FREQUENCY(IF(B2:H2="P",COLUMN(B2:H2)),IF(B2:H2<>"P",COLUMN(B2:H2))))))

Name1 May2 May3 May4 May5 May6 May7 MayTotal P (Consecutive)
Result
Total P (ConsecutiveP+WOP)
final result
ABCPPPWOPPAP35
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCDEFGHIJ
1Name01-May02-May03-May04-May05-May06-May07-MayTotal P (Consecutive)Total P (ConsecutiveP+WOP)
2ABCPPPWOPPAP35
Main
Cell Formulas
RangeFormula
J2J2=MAX(FREQUENCY(IF(ISNUMBER(SEARCH("P",B2:H2)),COLUMN(B2:H2)),IF(ISERROR(SEARCH("P",B2:H2)),COLUMN(B2:H2))))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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