Grouping by periods - Specific Scenario - Formula/Workaround

Jqarga

New Member
Joined
Dec 20, 2018
Messages
10
Hi guys,

Wonder if any of you have encountered a similar scenario:

I've got a table similar to the following one, with a few hundreds of different entities where each of them have its own specific "length". Don't know how exactly explain it but I would like to group the Q by buckets of "cycles" (First 4 Q = cycle 1 ; 2nd set of 4Q cycle 2 and so on...until it reaches the following entity where the grouping should be restarted.

As follows:

Entity NameStat Q
Period
Entity A2013Q2
1​
Entity A2013Q3
1​
Entity A2013Q4
1​
Entity A2014Q1
1​
Entity A2014Q2
2​
Entity A2014Q3
2​
Entity A2014Q4
2​
Entity A2015Q1
2​
Entity A2015Q2
3​
Entity B2014Q1
1​
Entity B2014Q2
1​
Entity B2014Q3
1​
Entity B2014Q4
1​
Entity B2015Q1
2​
Entity B2015Q2
2​
Entity C2018Q2
1​
Entity C2018Q3
1​
Entity C2018Q4
1​
Entity C2019Q1
1​
Entity D2017Q3
1​
Entity D2017Q4
1​

I know it's a very specific question but any workaround / formula to solve this would be much appreciated.

Many thanks,

J
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
How about
+Fluff New.xlsm
ABC
1Entity NameStat QPeriod
2Entity A2013Q21
3Entity A2013Q31
4Entity A2013Q41
5Entity A2014Q11
6Entity A2014Q22
7Entity A2014Q32
8Entity A2014Q42
9Entity A2015Q12
10Entity A2015Q23
11Entity B2014Q11
12Entity B2014Q21
13Entity B2014Q31
14Entity B2014Q41
15Entity B2015Q12
16Entity B2015Q22
17Entity C2018Q21
18Entity C2018Q31
19Entity C2018Q41
20Entity C2019Q11
21Entity D2017Q31
22Entity D2017Q41
Main
Cell Formulas
RangeFormula
C2:C22C2=INT((COUNTIF(A$2:A2,A2)-1)/4)+1
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

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