Counting Consecutive Year

myexcel211

New Member
Joined
Jan 25, 2022
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
Hi,

Could anyone help. I would Like to count the consecutive years of a client in excel. Example below,
Client 1 would be 6 as that is how many years in sequential order it appear in a row
Client 2 would be 2 as that is how many years in sequential order it appear in a row.
Anyone has any formula that would help me? Thanks!

YearClient
2009​
1​
2010​
1​
2011​
1​
2012​
1​
2013​
1​
2014​
1​
2009​
2​
2010​
2​
2011​
1​
2012​
2​
2013​
1​
2014​
2​
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi, try this
Book1
ABCD
1YearClientClientAnswer
22009116
32010122
420111
520121
620131
720141
820092
920102
1020111
1120122
1220131
1320142
Sheet1
Cell Formulas
RangeFormula
D2:D3D2=MAX(FREQUENCY(IF($B$2:$B$13=C2,ROW($B$2:$B$13)),IF($B$2:$B$13<>C2,ROW($B$2:$B$13))))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hi, try this
Book1
ABCD
1YearClientClientAnswer
22009116
32010122
420111
520121
620131
720141
820092
920102
1020111
1120122
1220131
1320142
Sheet1
Cell Formulas
RangeFormula
D2:D3D2=MAX(FREQUENCY(IF($B$2:$B$13=C2,ROW($B$2:$B$13)),IF($B$2:$B$13<>C2,ROW($B$2:$B$13))))
Press CTRL+SHIFT+ENTER to enter array formulas.
Thank you so much for your insight. Unfortunately, it didn't produce the outcomes that I was looking for. This formula did give outcomes based on the data column B. What was looking for is, the years that appear in orders: 2009,2010,2011,2012...etc. Thanks again. I will use this to work around.
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,525
Members
449,088
Latest member
RandomExceller01

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