Count and order (from A-Z) number of recurring text strings

zgoldflo

New Member
Joined
Dec 13, 2021
Messages
30
Office Version
  1. 365
Platform
  1. Windows
Hi folks.

Working with a (trimmed) dataset with over 25,000 rows of data.

Objective: Determine the top 100 most common route_taken for each user_type (only two user_type i.e. casual & member).
Details: Over 6,980 number_unique_routes.

Explanation: Trying to figure out either by using a pivot_table (tried but really don't know how to input data correctly) or by using a function/formula how to retrieve the most common routes taken for members and casual users. Would like to first understand how to apply the formula/function to retrieve the most common routes how many times they appear ordered by Z-A (to retrieve the top 100 rows of data). Not sure how to implement the =COUNTIF function in this scenario to count recurring text strings and how I can apply it. An explanation would really wrap my mind around it, thanks in advance (@Joe4 any ideas?).

e.g. something like this maybe? (open to suggestions on better ways to structure this)
*Note
with some route_taken you might get an instance where both members and casual riders use that route but members or casual riders could be the more common user. (See frequent_rider_route columns)

1639539967859.png


I think I made my problem quite clear - if any clarification is needed, please let me know!

See below MiniSheet


December_2020_trimmed_v2.csv
ABCDEFGHIJKLMNO
1ride_iduser_typerideable_typeday_of_weekstarted_atended_atride_lengthstart_station_nameend_station_nameroute_takenstart_station_idend_station_idstart_coordinatesend_coordinatesdistance_traveled_miles
28AC7643FDA05E1D4memberclassic_bike32020-12-08T05:41:00Z2020-12-08T06:21:00Z0:40:05Larrabee St & North AveHalsted St & Clybourn AveLarrabee St & North Ave to Halsted St & Clybourn AveTA130600000833141.91021, -87.643541.909668, -87.6481280.24089942
322B721668F54DF09memberclassic_bike42020-12-09T05:55:00Z2020-12-09T06:17:00Z0:21:56Larrabee St & North AveHalsted St & Clybourn AveLarrabee St & North Ave to Halsted St & Clybourn AveTA130600000833141.91021, -87.643541.909668, -87.6481280.24089942
40AE1B9DB2F1F8BC2memberclassic_bike12020-12-13T12:00:00Z2020-12-13T12:03:00Z0:03:03Larrabee St & North AveHalsted St & Clybourn AveLarrabee St & North Ave to Halsted St & Clybourn AveTA130600000833141.91021, -87.643541.909668, -87.6481280.24089942
58DAEDE1893BCCBC8memberclassic_bike62020-12-18T11:57:00Z2020-12-18T12:00:00Z0:03:00Larrabee St & North AveHalsted St & Clybourn AveLarrabee St & North Ave to Halsted St & Clybourn AveTA130600000833141.91021, -87.643541.909668, -87.6481280.24089942
6EEC33E416B277B7Acasualclassic_bike12020-12-20T18:47:00Z2020-12-20T19:00:00Z0:13:05Larrabee St & North AveHalsted St & Clybourn AveLarrabee St & North Ave to Halsted St & Clybourn AveTA130600000833141.91021, -87.643541.909668, -87.6481280.24089942
795B7ADC081755772casualclassic_bike42020-12-09T14:58:00Z2020-12-09T15:08:00Z0:10:36Greenview Ave & Fullerton AveHalsted St & Clybourn AveGreenview Ave & Fullerton Ave to Halsted St & Clybourn AveTA130700000133141.92533, -87.665841.909668, -87.6481281.413006342
839CD27FB31626CD0memberclassic_bike52020-12-10T11:18:00Z2020-12-10T11:30:00Z0:11:19Greenview Ave & Fullerton AveHalsted St & Clybourn AveGreenview Ave & Fullerton Ave to Halsted St & Clybourn AveTA130700000133141.92533, -87.665841.909668, -87.6481281.413006342
95F82004CA928515Ememberclassic_bike62020-12-04T17:25:00Z2020-12-04T17:51:00Z0:25:40Halsted St & 21st StHalsted St & Clybourn AveHalsted St & 21st St to Halsted St & Clybourn Ave1316233141.85378, -87.6466541.909668, -87.6481283.862298702
1063A630ACCB226FB9memberdocked_bike32020-12-01T16:47:00Z2020-12-01T17:01:00Z0:13:40Clinton St & Washington BlvdHalsted St & Clybourn AveClinton St & Washington Blvd to Halsted St & Clybourn AveWL-01233141.88338, -87.6411741.909668, -87.6481281.851270921
11E17C812526F9D612memberclassic_bike42020-12-16T19:26:00Z2020-12-16T19:41:00Z0:14:22Franklin St & Lake StHalsted St & Clybourn AveFranklin St & Lake St to Halsted St & Clybourn AveTA130700011133141.885837, -87.635541.909668, -87.6481281.770041463
1204B9C42C9716C149memberclassic_bike62020-12-11T11:18:00Z2020-12-11T11:27:00Z0:09:12Clark St & Chicago AveHalsted St & Clybourn AveClark St & Chicago Ave to Halsted St & Clybourn Ave1330333141.89675, -87.6308941.909668, -87.6481281.257971375
133F7080AE9A112A65memberclassic_bike22020-12-21T13:48:00Z2020-12-21T13:59:00Z0:10:08Clark St & Chicago AveHalsted St & Clybourn AveClark St & Chicago Ave to Halsted St & Clybourn Ave1330333141.89675, -87.6308941.909668, -87.6481281.257971375
14DFF386148F369DFFcasualdocked_bike62020-12-04T16:48:00Z2020-12-04T17:17:00Z0:28:52Michigan Ave & Pearson StHalsted St & Clybourn AveMichigan Ave & Pearson St to Halsted St & Clybourn Ave1303433141.89766, -87.6235141.909668, -87.6481281.513630094
156C6D711A027111B2casualdocked_bike62020-12-04T16:48:00Z2020-12-04T17:17:00Z0:28:21Michigan Ave & Pearson StHalsted St & Clybourn AveMichigan Ave & Pearson St to Halsted St & Clybourn Ave1303433141.89766, -87.6235141.909668, -87.6481281.513630094
16E91724E781837DD6memberclassic_bike12020-12-27T13:51:00Z2020-12-27T14:04:00Z0:13:44Michigan Ave & Pearson StHalsted St & Clybourn AveMichigan Ave & Pearson St to Halsted St & Clybourn Ave1303433141.89766, -87.6235141.909668, -87.6481281.513630094
17F4299DE0DFDDFD36memberclassic_bike12020-12-27T14:41:00Z2020-12-27T15:05:00Z0:24:50Michigan Ave & Pearson StHalsted St & Clybourn AveMichigan Ave & Pearson St to Halsted St & Clybourn Ave1303433141.89766, -87.6235141.909668, -87.6481281.513630094
180512A33336892105memberclassic_bike62020-12-04T13:04:00Z2020-12-04T13:14:00Z0:09:58Ashland Ave & Augusta BlvdHalsted St & Clybourn AveAshland Ave & Augusta Blvd to Halsted St & Clybourn Ave1324833141.899643, -87.667741.909668, -87.6481281.221793274
19D3C1914BB8301A7Fmemberclassic_bike12020-12-13T17:29:00Z2020-12-13T17:34:00Z0:05:04Larrabee St & Menomonee StHalsted St & Clybourn AveLarrabee St & Menomonee St to Halsted St & Clybourn AveTA130600000733141.91468, -87.6433241.909668, -87.6481280.425489373
209F21F589917D69CCcasualclassic_bike12020-12-06T12:12:00Z2020-12-06T13:15:00Z1:02:14Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
21BCC1E5EEDBB31529casualclassic_bike12020-12-06T12:12:00Z2020-12-06T13:15:00Z1:02:04Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
22AFE6DE4D8061D6F5memberclassic_bike12020-12-06T14:54:00Z2020-12-06T15:04:00Z0:09:10Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
23CAAABC0E9EA76453memberclassic_bike12020-12-06T15:48:00Z2020-12-06T15:57:00Z0:08:57Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
24EB83EB7EC542A6FBmemberclassic_bike52020-12-10T09:43:00Z2020-12-10T09:53:00Z0:09:40Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
255B9A60CCDD6A98C0memberclassic_bike72020-12-12T19:25:00Z2020-12-12T19:32:00Z0:06:46Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
2682B443DA84AA3BEEmemberclassic_bike22020-12-14T14:55:00Z2020-12-14T15:03:00Z0:08:14Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
275C13C2A9F537FAF4memberclassic_bike22020-12-14T15:43:00Z2020-12-14T15:53:00Z0:09:19Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
2806C887C108F035ABmemberclassic_bike12020-12-27T14:02:00Z2020-12-27T14:14:00Z0:11:30Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
29D084CF51C605C6F1memberclassic_bike32020-12-29T10:28:00Z2020-12-29T10:39:00Z0:10:44Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
3003926929025B28C4casualclassic_bike32020-12-29T10:29:00Z2020-12-29T10:39:00Z0:10:30Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
31E0D35323A3F37120memberclassic_bike42020-12-30T14:30:00Z2020-12-30T14:41:00Z0:11:36Clark St & Lincoln AveHalsted St & Clybourn AveClark St & Lincoln Ave to Halsted St & Clybourn Ave1317933141.915689, -87.634641.909668, -87.6481280.810492488
32B31E1E6AE33A971Acasualclassic_bike62020-12-04T11:04:00Z2020-12-04T11:10:00Z0:05:54Bissell St & Armitage AveHalsted St & Clybourn AveBissell St & Armitage Ave to Halsted St & Clybourn Ave1305933141.91844, -87.6522241.909668, -87.6481280.641575778
3329A5EF9EB208696Cmemberclassic_bike72020-12-19T16:23:00Z2020-12-19T16:37:00Z0:13:53Wilton Ave & Belmont AveHalsted St & Clybourn AveWilton Ave & Belmont Ave to Halsted St & Clybourn AveTA130700013433141.94018, -87.6530441.909668, -87.6481282.123278511
3424D4230E15AB999Cmemberclassic_bike42020-12-23T17:32:00Z2020-12-23T17:48:00Z0:16:13Wilton Ave & Belmont AveHalsted St & Clybourn AveWilton Ave & Belmont Ave to Halsted St & Clybourn AveTA130700013433141.94018, -87.6530441.909668, -87.6481282.123278511
35B487D55039F024CCmemberclassic_bike72020-12-05T14:14:00Z2020-12-05T14:33:00Z0:19:13Halsted St & Roscoe StHalsted St & Clybourn AveHalsted St & Roscoe St to Halsted St & Clybourn AveTA130900002533141.94367, -87.6489541.909668, -87.6481282.34972925
3616B7FFA064B5D6E7memberclassic_bike52020-12-10T23:47:00Z2020-12-11T00:11:00Z0:23:15Southport Ave & Waveland AveHalsted St & Clybourn AveSouthport Ave & Waveland Ave to Halsted St & Clybourn Ave1323533141.94815, -87.6639441.909668, -87.6481282.780353473
37F132B0A5A3A8E618memberclassic_bike72020-12-05T08:59:00Z2020-12-05T09:28:00Z0:28:39Michigan Ave & 18th StHalsted St & Clybourn AveMichigan Ave & 18th St to Halsted St & Clybourn Ave1315033141.857813, -87.6245541.909668, -87.6481283.782615327
38F8A1B3A64886E6DEmemberclassic_bike52020-12-17T09:09:00Z2020-12-17T09:41:00Z0:32:26Michigan Ave & 18th StHalsted St & Clybourn AveMichigan Ave & 18th St to Halsted St & Clybourn Ave1315033141.857813, -87.6245541.909668, -87.6481283.782615327
392BB5A5176858AF4Fmemberclassic_bike62020-12-04T15:35:00Z2020-12-04T16:01:00Z0:25:40Morgan St & Polk StHalsted St & Clybourn AveMorgan St & Polk St to Halsted St & Clybourn AveTA130700013033141.871737, -87.6510341.909668, -87.6481282.625068488
40F7BC88663BD0E589memberclassic_bike72020-12-05T11:22:00Z2020-12-05T11:39:00Z0:16:59Green St & Randolph StHalsted St & Clybourn AveGreen St & Randolph St to Halsted St & Clybourn Ave1305333141.883668, -87.6486741.909668, -87.6481281.796671786
41F2434FA3DA7E375Bmemberclassic_bike22020-12-21T15:48:00Z2020-12-21T15:58:00Z0:10:12Green St & Randolph StHalsted St & Clybourn AveGreen St & Randolph St to Halsted St & Clybourn Ave1305333141.883668, -87.6486741.909668, -87.6481281.796671786
42B9B5896F3987E87Cmemberdocked_bike42020-12-02T19:14:00Z2020-12-02T19:24:00Z0:10:12Orleans St & Merchandise Mart PlazaHalsted St & Clybourn AveOrleans St & Merchandise Mart Plaza to Halsted St & Clybourn AveTA130500002233141.888243, -87.6363941.909668, -87.6481281.598702019
4348317544FE71CA3Dcasualdocked_bike52020-12-03T05:24:00Z2020-12-03T05:36:00Z0:11:45Orleans St & Merchandise Mart PlazaHalsted St & Clybourn AveOrleans St & Merchandise Mart Plaza to Halsted St & Clybourn AveTA130500002233141.888243, -87.6363941.909668, -87.6481281.598702019
449E880C15C20F4C0Ememberclassic_bike72020-12-05T07:47:00Z2020-12-05T08:03:00Z0:15:11Orleans St & Merchandise Mart PlazaHalsted St & Clybourn AveOrleans St & Merchandise Mart Plaza to Halsted St & Clybourn AveTA130500002233141.888243, -87.6363941.909668, -87.6481281.598702019
453946CF247E7412D8memberclassic_bike12020-12-06T09:43:00Z2020-12-06T09:57:00Z0:14:09Orleans St & Merchandise Mart PlazaHalsted St & Clybourn AveOrleans St & Merchandise Mart Plaza to Halsted St & Clybourn AveTA130500002233141.888243, -87.6363941.909668, -87.6481281.598702019
465762DE06DBBF5E56memberclassic_bike52020-12-17T17:24:00Z2020-12-17T17:36:00Z0:11:48Orleans St & Merchandise Mart PlazaHalsted St & Clybourn AveOrleans St & Merchandise Mart Plaza to Halsted St & Clybourn AveTA130500002233141.888243, -87.6363941.909668, -87.6481281.598702019
47480DD48DCE8F8F07memberclassic_bike22020-12-28T15:13:00Z2020-12-28T15:22:00Z0:09:13Orleans St & Merchandise Mart PlazaHalsted St & Clybourn AveOrleans St & Merchandise Mart Plaza to Halsted St & Clybourn AveTA130500002233141.888243, -87.6363941.909668, -87.6481281.598702019
48B044F542D7E52FF5memberclassic_bike42020-12-23T13:18:00Z2020-12-23T13:37:00Z0:19:16Lake Shore Dr & Ohio StHalsted St & Clybourn AveLake Shore Dr & Ohio St to Halsted St & Clybourn AveTA130600002933141.89257, -87.61449241.909668, -87.6481282.094717503
49D000F7DF98EB762Cmemberclassic_bike52020-12-31T17:21:00Z2020-12-31T17:38:00Z0:17:25Lake Shore Dr & Ohio StHalsted St & Clybourn AveLake Shore Dr & Ohio St to Halsted St & Clybourn AveTA130600002933141.89257, -87.61449241.909668, -87.6481282.094717503
503BDEE3EFF60A7715casualclassic_bike22020-12-21T12:24:00Z2020-12-21T12:44:00Z0:20:29Damen Ave & Chicago AveHalsted St & Clybourn AveDamen Ave & Chicago Ave to Halsted St & Clybourn Ave1313233141.895769, -87.6772241.909668, -87.6481281.777778451
December_2020_trimmed_v2
Cell Formulas
RangeFormula
J2:J50J2=CONCAT(H2," to ", I2)
 

Attachments

  • 1639539472227.png
    1639539472227.png
    10 KB · Views: 7
From the sample data set that I have when I use the top 10 filter I only get 10 routes, I'm still not sure why you're getting more.

I have another idea though, I'll post later.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
From my data set Members far out weigh casual riders so when we do Top 10 by route_taken, this will be the distribution.

If you only do count of routes, the same list of routes seems to be returned by formula or pivot paths.

I don't think Pivot tables will give you the expanded view your looking for like in my formula table.

PT Fields Rows=route_taken Values=Count of route_taken & Avg of ride_length.

Count and order (from A-Z) number of recurring text strings_zgoldflo.xlsx
ABC
1route_takenCount of route_takenAverage of ride_length
2Clark St & Lincoln Ave to Halsted St & Clybourn Ave1200:18:24
3Orleans St & Merchandise Mart Plaza to Halsted St & Clybourn Ave600:12:03
4Larrabee St & North Ave to Halsted St & Clybourn Ave500:16:14
5Michigan Ave & Pearson St to Halsted St & Clybourn Ave400:23:57
6Michigan Ave & 18th St to Halsted St & Clybourn Ave200:30:32
7Green St & Randolph St to Halsted St & Clybourn Ave200:13:36
8Wilton Ave & Belmont Ave to Halsted St & Clybourn Ave200:15:03
9Greenview Ave & Fullerton Ave to Halsted St & Clybourn Ave200:10:57
10Clark St & Chicago Ave to Halsted St & Clybourn Ave200:09:40
11Lake Shore Dr & Ohio St to Halsted St & Clybourn Ave200:18:21
12Grand Total3900:17:05
13
14shared_routesCOUNTIFAVERAGEIFS
15Clark St & Lincoln Ave to Halsted St & Clybourn Ave1200:18:24
16Orleans St & Merchandise Mart Plaza to Halsted St & Clybourn Ave600:12:03
17Larrabee St & North Ave to Halsted St & Clybourn Ave500:16:14
18Michigan Ave & Pearson St to Halsted St & Clybourn Ave400:23:57
19Greenview Ave & Fullerton Ave to Halsted St & Clybourn Ave200:10:57
20Clark St & Chicago Ave to Halsted St & Clybourn Ave200:09:40
21Wilton Ave & Belmont Ave to Halsted St & Clybourn Ave200:15:03
22Michigan Ave & 18th St to Halsted St & Clybourn Ave200:30:32
23Green St & Randolph St to Halsted St & Clybourn Ave200:13:35
24Lake Shore Dr & Ohio St to Halsted St & Clybourn Ave200:18:20
253900:16:53
26
Sheet2
Cell Formulas
RangeFormula
A15:A24A15=INDEX(UNIQUE(SORTBY(FILTER(Table1[route_taken],Table1[Frequency]>0),Table1[Frequency],-1)),SEQUENCE(10))
B15:B24B15=COUNTIF(Table1[route_taken],A15)
C15:C24C15=AVERAGEIFS(Table1[ride_length_convert],Table1[route_taken],A15)
B25B25=SUM(B15:B24)
C25C25=AVERAGE(C15:C24)
Dynamic array formulas.
 
Upvote 0
@RasGhul After gathering all the data needed for the 12 months of the year, i.e. 'Frequent Monthly Routes' I am looking to consolidate all this data into one table that depicts the 'Annual Top Routes' that contains all the same data points as the 'Frequent Monthly Routes' for both members and casual users, depicting the annual totals. Currently, all the monthly data (for both members and casuals) are in separate Excel Workbooks organized by month and are displayed in Pivot Tables. What I thought to do, in considering the best method in extracting the top annual routes by users, is to create a separate workbook that organizes the data by user status in two separate sheets i.e. casual user data in one sheet and member user data in another. The data in both respective sheets will be organized by month. What I need to do is simply extract the totals listed throughout the months of the year to solve for the top annual routes. Let me share a snapshot of what I began to create but not quite finished:

12_Months_Joined.xlsx
ABCDEFGHI
1monthroute_nameroute_countavg_ride_lengthclassic_bikeride_classic_avgelectric_bikeride_electric_avg
2Lake Shore Dr & Monroe St to Lake Shore Dr & Monroe St850:38:28690:42:32160:20:54
3Michigan Ave & 18th St to Michigan Ave & 18th St370:30:09350:30:0820:30:22
4DECEMBERStreeter Dr & Grand Ave to Streeter Dr & Grand Ave330:50:26260:54:1570:36:13
5Millennium Park to Millennium Park270:25:48220:24:3550:31:09
6Michigan Ave & Washington St to Michigan Ave & Washington St250:52:46200:56:0350:39:39
7Lake Shore Dr & Monroe St to Dusable Harbor220:44:14170:42:5050:49:00
8Michigan Ave & Lake St to Michigan Ave & Lake St201:17:46101:51:01100:44:30
9Dusable Harbor to Dusable Harbor190:30:46110:28:5480:33:19
10Shore Dr & 55th St to Shore Dr & 55th St180:32:10160:30:2020:46:54
11Chicago Ave & Sheridan Rd to Chicago Ave & Sheridan Rd180:56:41150:59:5330:40:44
12Blackstone Ave & Hyde Park Blvd to Ellis Ave & 58th St180:10:10130:10:5750:08:07
13Grand Total December3220:40:152540:44:41680:34:37
14
15JANUARYMichigan Ave & 18th St to Michigan Ave & 18th St390:29:37390:29:3700:00:00
16Ellis Ave & 60th St to Ellis Ave & 55th St370:07:39370:07:3900:00:00
17Kimbark Ave & 53rd St to Ellis Ave & 60th St290:13:11280:13:1210:12:34
18Ellis Ave & 55th St to Ellis Ave & 60th St 260:06:20260:06:2000:00:00
19Shields Ave & 28th Pl to Michigan Ave & 14th St180:13:17180:13:1700:00:00
20Winthrop Ave & Lawrence Ave to Southport Ave & Waveland Ave180:11:38160:11:4520:10:37
21Broadway & Cornelia Ave to Broadway & Cornelia Ave 170:45:27111:01:2260:16:17
22Sedgwick St & Huron St to Clark St & Elm St170:07:13160:07:1210:07:31
23Ellis Ave & 60th St to Kimbark Ave & 53rd St170:13:30150:14:1620:07:46
24Daley Center Plaza to Clark St & 9th St (AMLI) 170:08:43110:09:2960:07:18
25Michigan Ave & Lake St to Michigan Ave & Lake St170:40:40150:44:0920:14:35
26Grand Total January2520:17:272320:18:12200:06:23
Casual
Cell Formulas
RangeFormula
F26,H26F26=SUM(F15:F25,)
G26,I26G26=AVERAGE(G15:G25,)


Only the months for December, January is currently there. As you can see this sheet shows only the casual user data and is listed by month. The data displayed are the monthly (Dec & Jan) totals for frequented routes. I need to find any matching route_names and tally up the totals to create my annual dataset. For example, as you can see the route 'Michigan Ave & 18th St to Michigan Ave & 18th St' is repeated between Jan & Dec. I would like to figure out a way to implement a count to tally up all matching route_names and their respective data and be able to implement this across all 12 months once listed in the sheet.

If you don't understand what it is I am trying to accomplish I have included a short Loom video explaining what I am trying to accomplish.

Would it make more sense to upload this data into RStudio or an SQL server to implement code to get totals or is this still possible with excel?
 
Upvote 0
Here is the finished sheet for the Casual users. I have implemented the =INDEX() formula to retrieve the most repeated text but cannot seem to get it to work correctly.

What I plan to do, is after I get my most repeated set of values i.e. route_name, I then would manually add up all the data (unless there is a better way), then set a condition to return the next most repeated value (e.g. the next value which is not the first value which was returned as the highest).

Trying to figure out how to structure this.

Above I believe I clearly outlined what I want to do. If you need further clarity I have attached another Loom video.

*Correction on my INDEX() formula. Still not working...

=INDEX(B2:B146,MODE(MATCH(B2:B146,B2:B146,0)))

Did the Ctrl+Shift+Enter as well, no luck, just returning #N/A?




Frequent-Routes-by-User.xlsx
ABCDEFGHIJK
1monthroute_nameroute_countavg_ride_lengthclassic_bikeride_classic_avgelectric_bikeride_electric_avg#N/A
2Lake Shore Dr & Monroe St to Lake Shore Dr & Monroe St850:38:28690:42:32160:20:54
3Michigan Ave & 18th St to Michigan Ave & 18th St370:30:09350:30:0820:30:22
4DECEMBERStreeter Dr & Grand Ave to Streeter Dr & Grand Ave330:50:26260:54:1570:36:13
5Millennium Park to Millennium Park270:25:48220:24:3550:31:09
6Michigan Ave & Washington St to Michigan Ave & Washington St250:52:46200:56:0350:39:39
7Lake Shore Dr & Monroe St to Dusable Harbor220:44:14170:42:5050:49:00
8Michigan Ave & Lake St to Michigan Ave & Lake St201:17:46101:51:01100:44:30
9Dusable Harbor to Dusable Harbor190:30:46110:28:5480:33:19
10Shore Dr & 55th St to Shore Dr & 55th St180:32:10160:30:2020:46:54
11Chicago Ave & Sheridan Rd to Chicago Ave & Sheridan Rd180:56:41150:59:5330:40:44
12Blackstone Ave & Hyde Park Blvd to Ellis Ave & 58th St180:10:10130:10:5750:08:07
13Grand Total December3220:40:152540:44:41680:34:37
14
15JANUARYMichigan Ave & 18th St to Michigan Ave & 18th St390:29:37390:29:3700:00:00
16Ellis Ave & 60th St to Ellis Ave & 55th St370:07:39370:07:3900:00:00
17Kimbark Ave & 53rd St to Ellis Ave & 60th St290:13:11280:13:1210:12:34
18Ellis Ave & 55th St to Ellis Ave & 60th St 260:06:20260:06:2000:00:00
19Shields Ave & 28th Pl to Michigan Ave & 14th St180:13:17180:13:1700:00:00
20Winthrop Ave & Lawrence Ave to Southport Ave & Waveland Ave180:11:38160:11:4520:10:37
21Broadway & Cornelia Ave to Broadway & Cornelia Ave 170:45:27111:01:2260:16:17
22Sedgwick St & Huron St to Clark St & Elm St170:07:13160:07:1210:07:31
23Ellis Ave & 60th St to Kimbark Ave & 53rd St170:13:30150:14:1620:07:46
24Daley Center Plaza to Clark St & 9th St (AMLI) 170:08:43110:09:2960:07:18
25Michigan Ave & Lake St to Michigan Ave & Lake St170:40:40150:44:0920:14:35
26Grand Total January2520:17:272320:18:12200:06:23
27
28FEBRUARYEllis Ave & 60th St to Ellis Ave & 55th St 200:05:49200:05:4900:00
29Daley Center Plaza to Daley Center Plaza 190:27:40190:27:4000:00
30Lake Shore Dr & Monroe St to Lake Shore Dr & Monroe St150:30:39120:35:4430:10:17
31Millennium Park to Millennium Park150:31:49130:32:1120:29:22
32Broadway & Barry Ave to Halsted St & Clybourn Ave120:16:50120:16:5000:00
33Wabash Ave & 16th St to Wabash Ave & 16th St110:32:57100:27:1811:29:25
34Michigan Ave & 8th St to Michigan Ave & 8th St110:24:20110:24:2000:00
35Field Blvd & South Water St to Fairbanks St & Superior St110:10:2300:00110:10:23
36Ellis Ave & 55th St to Ellis Ave & 60th St 110:05:07100:05:1910:03:09
37Fairbanks St & Superior St to Field Blvd & South Water St110:10:2350:11:3760:09:21
38Grand Total February1360:19:491120:18:41240:15:12
39
40MARCHLake Shore Dr & Monroe St to Lake Shore Dr & Monroe St2920:37:102530:38:26390:29:02
41Streeter Dr & Grand Ave to Streeter Dr & Grand Ave2400:43:492030:44:12370:41:41
42Millennium Park to Millennium Park1990:39:491750:40:26240:35:17
43Michigan Ave & Oak St to Michigan Ave & Oak St1380:46:241080:48:06300:40:16
44Indiana Ave & Roosevelt Rd to Indiana Ave & Roosevelt Rd1130:47:13830:43:46300:56:47
45Shore Dr & 55th St to Shore Dr & 55th St910:47:48840:48:0170:45:12
46Buckingham Fountain to Buckingham Fountain860:40:49700:40:49160:40:44
47Michigan Ave & 8th St to Michigan Ave & 8th St860:39:55760:42:04100:23:36
48Lake Shore Dr & Monroe St to Streeter Dr & Grand Ave830:33:17660:32:56170:34:43
49Shedd Aquarium to Shedd Aquarium820:49:55700:53:49120:27:10
50Grand Total March14100:41:5811880:43:152220:37:27
51
52APRILLake Shore Dr & Monroe St to Lake Shore Dr & Monroe St4400:40:203870:40:26530:39:36
53Streeter Dr & Grand Ave to Streeter Dr & Grand Ave3600:46:013130:46:41470:41:33
54Millennium Park to Millennium Park2590:39:472290:40:03300:37:42
55Michigan Ave & Oak St to Michigan Ave & Oak St2540:48:522170:49:27370:45:28
56Buckingham Fountain to Buckingham Fountain1980:52:101700:52:31280:50:04
57Indiana Ave & Roosevelt Rd to Indiana Ave & Roosevelt Rd1770:51:071400:54:07370:39:45
58Fort Dearborn Dr & 31st St to Fort Dearborn Dr & 31st St1340:56:181220:56:45120:51:43
59Shore Dr & 55th St to Shore Dr & 55th St1250:43:031060:40:51190:55:20
60Montrose Harbor to Montrose Harbor1240:47:14980:47:43260:45:28
61Theater on the Lake to Theater on the Lake1210:44:531130:43:1181:08:53
62Grand Total April21920:45:5418950:47:102970:47:33
63
64MAYStreeter Dr & Grand Ave to Streeter Dr & Grand Ave9520:42:247630:42:411890:41:16
65Lake Shore Dr & Monroe St to Lake Shore Dr & Monroe St5790:36:594450:36:511340:37:26
66Millennium Park to Millennium Park5180:44:324210:43:24970:49:27
67Lake Shore Dr & Monroe St to Streeter Dr & Grand Ave5130:29:194100:28:571030:30:47
68Michigan Ave & Oak St to Michigan Ave & Oak St4850:49:333580:49:131270:50:30
69Buckingham Fountain to Buckingham Fountain3420:46:492510:46:33910:47:33
70Indiana Ave & Roosevelt Rd to Indiana Ave & Roosevelt Rd2830:48:422110:51:42720:39:56
71Lake Shore Dr & North Blvd to Lake Shore Dr & North Blvd2460:46:381890:48:25570:40:45
72Streeter Dr & Grand Ave to Lake Shore Dr & Monroe St2420:29:141900:29:12520:29:25
73Shedd Aquarium to Streeter Dr & Grand Ave2300:31:091700:33:01600:25:54
74Grand Total May43900:40:5234080:41:009820:39:18
75
76JUNEStreeter Dr & Grand Ave to Streeter Dr & Grand Ave11810:42:209260:42:402550:41:09
77Michigan Ave & Oak St to Michigan Ave & Oak St6180:50:374830:52:531350:42:31
78Lake Shore Dr & Monroe St to Lake Shore Dr & Monroe St6030:41:264850:42:571180:35:12
79Millennium Park to Millennium Park5610:42:364400:43:521210:38:02
80Lake Shore Dr & Monroe St to Streeter Dr & Grand Ave5590:26:544600:27:39990:23:24
81Buckingham Fountain to Buckingham Fountain5430:43:033560:40:321870:47:50
82Streeter Dr & Grand Ave to Millennium Park4180:30:383450:31:14730:27:51
83Indiana Ave & Roosevelt Rd to Indiana Ave & Roosevelt Rd3370:46:582360:48:311010:43:20
84Streeter Dr & Grand Ave to Michigan Ave & Oak St3360:23:152820:22:21540:27:56
85Millennium Park to Streeter Dr & Grand Ave3290:38:302850:38:36440:37:50
86Grand Total June54850:39:4142980:39:0811876:05:05
87
88JULYStreeter Dr & Grand Ave to Streeter Dr & Grand Ave14350:42:2912120:42:572230:39:56
89Michigan Ave & Oak St to Michigan Ave & Oak St6850:46:165490:47:211360:41:51
90Millennium Park to Millennium Park5570:40:184610:40:26960:39:43
91Lake Shore Dr & Monroe St to Lake Shore Dr & Monroe St4850:38:313960:39:05890:36:01
92Lake Shore Dr & Monroe St to Streeter Dr & Grand Ave4800:26:183910:26:10890:26:51
93Streeter Dr & Grand Ave to Millennium Park4670:32:453950:31:53720:37:31
94Millennium Park to Streeter Dr & Grand Ave4300:40:203410:43:00890:30:05
95Streeter Dr & Grand Ave to Michigan Ave & Oak St3880:27:193280:28:20600:21:44
96Shedd Aquarium to Streeter Dr & Grand Ave3470:37:142770:36:17700:40:58
97Streeter Dr & Grand Ave to Lake Shore Dr & North Blvd3230:22:522900:23:04330:21:03
98Grand Total July55970:37:3146400:35:519570:33:34
99
100AUGUSTStreeter Dr & Grand Ave to Streeter Dr & Grand Ave12900:42:0410520:43:062380:37:28
101Michigan Ave & Oak St to Michigan Ave & Oak St7040:49:045810:50:291230:42:25
102DuSable Lake Shore Dr & Monroe St to DuSable Lake Shore Dr & Monroe St6070:41:444750:42:521320:37:41
103DuSable Lake Shore Dr & Monroe St to Streeter Dr & Grand Ave5310:28:404340:27:42970:32:57
104Millennium Park to Millennium Park4820:39:523800:42:201020:30:41
105Streeter Dr & Grand Ave to DuSable Lake Shore Dr & North Blvd3770:23:293240:23:40530:22:20
106Millennium Park to Streeter Dr & Grand Ave3720:40:303190:40:48530:38:42
107Theater on the Lake to Theater on the Lake3690:45:123130:45:35560:42:59
108Streeter Dr & Grand Ave to Millennium Park3570:32:472960:34:05610:26:27
109Shedd Aquarium to Streeter Dr & Grand Ave3490:34:482950:34:46540:35:01
110Grand Total August54380:39:1044690:38:329690:34:40
111
112SEPTEMBERStreeter Dr & Grand Ave to Streeter Dr & Grand Ave10010:42:598310:43:281700:40:38
113DuSable Lake Shore Dr & Monroe St to Streeter Dr & Grand Ave5300:25:164430:24:58870:26:47
114Michigan Ave & Oak St to Michigan Ave & Oak St4990:55:304050:57:53940:45:12
115DuSable Lake Shore Dr & Monroe St to DuSable Lake Shore Dr & Monroe St4730:42:513870:42:42860:43:31
116Millennium Park to Millennium Park3380:45:322620:48:00760:36:59
117Streeter Dr & Grand Ave to Millennium Park3190:34:442600:34:41590:34:57
118Streeter Dr & Grand Ave to DuSable Lake Shore Dr & North Blvd2980:23:232700:23:32280:21:59
119Streeter Dr & Grand Ave to Michigan Ave & Oak St2740:25:392270:25:32470:26:09
120Streeter Dr & Grand Ave to DuSable Lake Shore Dr & Monroe St2720:31:332310:29:05410:45:23
121Shedd Aquarium to Streeter Dr & Grand Ave2570:31:002020:32:12550:26:36
122Grand Total September42610:37:5335180:36:127430:34:49
123
124OCTOBERStreeter Dr & Grand Ave to Streeter Dr & Grand Ave4740:39:013580:41:571160:29:56
125DuSable Lake Shore Dr & Monroe St to Streeter Dr & Grand Ave3050:26:002440:25:39610:27:25
126DuSable Lake Shore Dr & Monroe St to DuSable Lake Shore Dr & Monroe St2900:35:412140:37:47760:29:45
127Millennium Park to Millennium Park2710:40:481890:44:52820:31:28
128Ellis Ave & 60th St to Ellis Ave & 55th St2170:07:171990:07:34180:04:17
129Streeter Dr & Grand Ave to Millennium Park2050:29:511520:32:06530:23:23
130Ellis Ave & 60th St to University Ave & 57th St1980:08:171820:08:42160:03:39
131Michigan Ave & Oak St to Michigan Ave & Oak St1930:43:481180:44:57750:42:01
132Ellis Ave & 55th St to Ellis Ave & 60th St1910:07:261770:07:42140:04:00
133Millennium Park to Streeter Dr & Grand Ave1850:44:421420:46:43430:38:02
134Grand Total October25290:29:4719750:29:485540:23:23
135
136NOVEMBERDuSable Lake Shore Dr & Monroe St to Streeter Dr & Grand Ave1560:25:041080:27:12480:20:16
137DuSable Lake Shore Dr & Monroe St to DuSable Lake Shore Dr & Monroe St1390:34:51990:39:24400:23:37
138Streeter Dr & Grand Ave to Streeter Dr & Grand Ave1360:34:31980:34:02380:35:46
139Ellis Ave & 60th St to Ellis Ave & 55th St1120:07:051070:07:1450:03:53
140Ellis Ave & 60th St to University Ave & 57th St1110:10:181060:10:3550:04:27
141Millennium Park to Millennium Park990:29:58520:28:15470:31:53
142Ellis Ave & 55th St to Ellis Ave & 60th St940:07:19890:07:2850:04:46
143Chicago Ave & Sheridan Rd to Sheridan Rd & Noyes St (NU)930:06:21530:06:47400:05:47
144Kimbark Ave & 53rd St to University Ave & 57th St850:15:02760:15:4690:08:55
145Streeter Dr & Grand Ave to DuSable Lake Shore Dr & Monroe St830:15:13440:15:53390:14:28
146Grand Total November11080:20:018320:19:152760:15:23
Casual
Cell Formulas
RangeFormula
K1K1=INDEX(B2:I146,MODE(MATCH(B2:I146,B2:I146,0)))
F26,H26F26=SUM(F15:F25,)
G26,I26G26=AVERAGE(G15:G25,)
F62,H62F62=SUM(F52:F61)
G62,I62G62=AVERAGE(G52:G61)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
Actually,

I figured out how to do this using a Pivot Table. Thanks!!!
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,636
Members
449,043
Latest member
farhansadik

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