Consecutive Number of Years

tbrynard01

Board Regular
Joined
Sep 20, 2017
Messages
129
Office Version
  1. 365
Platform
  1. Windows
I have a large excel sheet of data with donation information is there an easy way I can get a list of names of people that have given 5 consecutive years
The columns are:
User ID / User Name / Date of Gift / Amount of Gift

Help will be appreciated

I have Excel 365
Thank you
Theresa
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Could you post even a small sample of your data using XL2BB?
 
Upvote 0
I have Excel 365
Please update your Account details (click your user name at the top right of the forum) with that information so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Would something like this work for you?

tbrynard_1.xlsm
ABCDEFGH
1User IDUser NameDateAmountConsecutive Yrs:5
2ID111/07/201695
3ID228/07/201591User IDYes/No
4ID34/12/201941ID1Yes
5ID217/10/201357ID2No
6ID11/04/201326ID3Yes
7ID114/10/201637 
8ID225/11/201494 
9ID122/02/202053 
10ID222/01/202048
11ID326/07/201478
12ID213/11/201559
13ID19/01/201629
14ID330/11/201645
15ID219/08/201877
16ID120/11/201588
17ID114/06/201573
18ID218/10/201467
19ID112/10/20134
20ID218/10/201396
21ID320/06/201728
22ID231/07/201977
23ID130/07/201462
24ID39/08/201520
25ID230/06/201934
26ID119/10/201435
27ID129/09/201934
28ID221/04/201911
29ID323/10/201899
30ID228/08/202050
31ID129/03/20146
32ID224/04/202077
33ID118/08/202088
34ID319/02/201873
35ID221/06/201367
36ID126/03/20184
37ID120/05/201755
38ID29/02/20183
39ID319/09/201655
40ID223/02/201865
41ID19/02/201487
42ID27/10/202099
Sheet1
Cell Formulas
RangeFormula
G4:G6G4=UNIQUE(A2:A42)
H4:H9H4=IF(G4="","",LET(yrs,SORT(UNIQUE(FILTER(YEAR(C$2:C$42),A$2:A$42=G4))),seq,SEQUENCE(COUNT(yrs)-1),str,CONCAT(IF(INDEX(yrs,seq+1)-INDEX(yrs,seq)=1,1,0)),IF(ISNUMBER(FIND(REPT(1,H$1-1),str)),"Yes","No")))
Dynamic array formulas.
 
Last edited:
Upvote 0
Please update your Account details (click your user name at the top right of the forum) with that information so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Would something like this work for you?

tbrynard_1.xlsm
ABCDEFGH
1User IDUser NameDateAmountConsecutive Yrs:5
2ID111/07/201695
3ID228/07/201591User IDYes/No
4ID34/12/201941ID1Yes
5ID217/10/201357ID2No
6ID11/04/201326ID3Yes
7ID114/10/201637 
8ID225/11/201494 
9ID122/02/202053 
10ID222/01/202048
11ID326/07/201478
12ID213/11/201559
13ID19/01/201629
14ID330/11/201645
15ID219/08/201877
16ID120/11/201588
17ID114/06/201573
18ID218/10/201467
19ID112/10/20134
20ID218/10/201396
21ID320/06/201728
22ID231/07/201977
23ID130/07/201462
24ID39/08/201520
25ID230/06/201934
26ID119/10/201435
27ID129/09/201934
28ID221/04/201911
29ID323/10/201899
30ID228/08/202050
31ID129/03/20146
32ID224/04/202077
33ID118/08/202088
34ID319/02/201873
35ID221/06/201367
36ID126/03/20184
37ID120/05/201755
38ID29/02/20183
39ID319/09/201655
40ID223/02/201865
41ID19/02/201487
42ID27/10/202099
Sheet1
Cell Formulas
RangeFormula
G4:G6G4=UNIQUE(A2:A42)
H4:H9H4=IF(G4="","",LET(yrs,SORT(UNIQUE(FILTER(YEAR(C$2:C$42),A$2:A$42=G4))),seq,SEQUENCE(COUNT(yrs)-1),str,CONCAT(IF(INDEX(yrs,seq+1)-INDEX(yrs,seq)=1,1,0)),IF(ISNUMBER(FIND(REPT(1,H$1-1),str)),"Yes","No")))
Dynamic array formulas.
Thank you so much, that is perfect!
 
Upvote 0
You're welcome. Thanks for the follow-up. :)

BTW, don't forget to do that account update for your Excel version. ?
 
Upvote 0

Forum statistics

Threads
1,216,102
Messages
6,128,851
Members
449,471
Latest member
lachbee

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