Formula for number of visits for each account number

miguel08

New Member
Joined
Jul 28, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am using excel office 365 and am having a issue. Creating the formula for a spreadsheet. Basically I have 2 tabs one has all the detailed data and on the other tab for each account number I need to be able to pull the total number of visits for each specific month in each column how do write the formula to get what I need on the spreadsheet? Here's the summary tab and the detailed tab :

TEST FILE.xlsx
ABCDEFGHIJKLMNO
1Account NumberNAMEJANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDECTotal
232144 Wc 10/16/19Nikocevic, Bisera0
333280Madrid, Celia0
433557 Nf 3/2/21Dixon, Alice0
530912Gonzalez, Maria, E0
632571Mickens, Sharnice, L0
733719Valdovinos Gamez, Maria0
821747Winston, Marc, A0
919247Rivera Sr, Milton0
1017065McGinness, Paul0
1114900Hawk, Cleo0
1211202Boyd, Queenie, E0
1333793Draper, Anthony0
1413289Dubois, Josephine, M0
1516666MANNING, JOHN, J0
1633542NF 2/26/21Callands, Stephanie0
1733630Carrier, Jeffrey0
1815135Hollingsworth, Rosalie, R0
1933550Montiel, Alicia0
2033815Patterson, Hyacinth0
2121539Weddle, Giovanna0
2217656Muccigrosso, Dorothea, T0
2333721Martin, Kathrine, P0
2427113Gonzalez, Norma0
2533289Green, Wendy, S0
2633929Santana, Maria0
2732751Hood, Ron0
2833722Jorban, Charnika0
299775Rizzo, Salvatore0
3032932 Nf 5/15/2020Edwards, Angel0
3121140Vadakel, Aleyamma, M0
3233726Oriol, Chrissy0
3333736Hernandez, Gabrielle0
3433656Gonzalez, Leonel0
3533857Silverman, Louise0
3633853Schulman, Daniel0
3733854Schulman, Mark Andrew0
3833636Trujillo, Sara0
3933401Tulimero, Rosanne, P0
4020981Torres, Jose, A0
4130919wc 08/16/2018Watts, Kawanna0
4233655Long, David0
4321747Winston, Marc, A0
4421539Weddle, Giovanna0
4530919wc 08/16/2018Watts, Kawanna0
4626066VALENCIA, ANITA0
4721140Vadakel, Aleyamma, M0
4833929Santana, Maria0
4919623Saini, Raj0
509775Rizzo, Salvatore0
Summary
Cell Formulas
RangeFormula
O2:O50O2=SUM(C2:N2)


TEST FILE.xlsx
ABCDE
1MonthAccount NumberSERVICE DATEPVDRPATIENT
2JUL32144 Wc 10/16/197/26/2021PMDNikocevic, Bisera
3JUL332807/26/2021PMDMadrid, Celia
4JUL33557 Nf 3/2/217/26/2021BADixon, Alice
5JUL309127/26/2021PMDGonzalez, Maria, E
6JUL325717/26/2021BAMickens, Sharnice, L
7JUL337197/26/2021PMDValdovinos Gamez, Maria
8JUL217477/26/2021PMDWinston, Marc, A
9JUL192477/26/2021PMDRivera Sr, Milton
10JUL170657/26/2021BAMcGinness, Paul
11JUL149007/26/2021PMDHawk, Cleo
12JUL112027/26/2021PMDBoyd, Queenie, E
13JUL337937/26/2021PMDDraper, Anthony
14JUL132897/26/2021BADubois, Josephine, M
15JUL166667/26/2021PMDMANNING, JOHN, J
16JUL33542NF 2/26/217/26/2021BACallands, Stephanie
17JUL336307/26/2021PMDCarrier, Jeffrey
18JUL151357/26/2021PMDHollingsworth, Rosalie, R
19JUL157757/8/2021PMDKershaw, Yolanda
20JUL317837/8/2021PMDHodnett, Beverly, J
21JUL338657/8/2021ELCGriffiths, Mitzie
22JUL251387/8/2021PMDFaulkner, Mary
23JUL338357/8/2021ELCFabiani, Rosann
24JUL336497/8/2021PMDEvans, Donna
25JUL335237/8/2021PMDDunkley, Stephen, J
26JUL292587/8/2021ELCDeMasi, Regina, D
27JUL326587/8/2021ELCDavis, Electra, V
28JUL327477/8/2021PMDCorreia, Silvie
29JUL32666 Wc 12-19-197/8/2021PMDCisneros, Jose
30JUL105697/8/2021PMDAvery, Deborah
31JUL219007/7/2021PMDZanko, Arthur, M
32JUL318497/7/2021PMDZambrano, Hugo, E
33JUL217477/7/2021PMDWinston, Marc, A
34JUL301757/7/2021BAWhite, Mabeline, V
35JUL30919wc 08/16/20187/7/2021PMDWatts, Kawanna
36JUL337197/7/2021PMDValdovinos Gamez, Maria
37JUN97756/30/2021PMDRizzo, Salvatore
38JUN338266/30/2021BARichy, James
39JUN176566/28/2021PMDMuccigrosso, Dorothea, T
40JUN325716/28/2021BAMickens, Sharnice, L
41JUN166666/28/2021PMDMANNING, JOHN, J
42JUN336556/28/2021PMDLong, David
43JUN337276/28/2021PMDLEMPERT, CATHY
44JUN252356/28/2021PMDLecount, Suzanne
45JUN98106/28/2021PMDJones, Rhonda
46JUN327516/28/2021PMDHood, Ron
47JUN250756/28/2021PMDGrillo, Ann Marie
48JUN33847NF05/25/216/28/2021BAFresella, Malik
49JUN32932 Nf 5/15/20206/28/2021PMDEdwards, Angel
50JUN132896/28/2021BADubois, Josephine, M
51JUN33557 Nf 3/2/216/28/2021BADixon, Alice
52JUN334646/28/2021BADavidson, Takiesha
53JUN33811 WC 5/20/216/28/2021PMDCowan, Tanya
54JUN278286/28/2021PMDCONTRERAS, YANET, R
55JUN256326/28/2021PMDChavez, Elva
56JUN336306/28/2021PMDCarrier, Jeffrey
57JUN33542NF 2/26/216/28/2021BACallands, Stephanie
58JUN337916/28/2021BABoggi, Anthony, J
59JUN328496/28/2021PMDBenjamin, Tariq, S
60JUN337656/28/2021BABailey, Zaneta
61JUN330926/28/2021BAAyala, Christian
62JUN335636/28/2021BAAlcala Sr, Kendall
63JUN269326/28/2021BAAdjekughele, Jude, O
64JUN219006/25/2021PMDZanko, Arthur, M
65JUN318496/25/2021PMDZambrano, Hugo, E
66JUN217476/25/2021PMDWinston, Marc, A
67JUN301756/25/2021BAWhite, Mabeline, V
68JUN336836/25/2021BASofianoudis Drapeau, Tasoula
69JUN253636/25/2021BAShain, LAWRENCE
70JUN188566/25/2021BAQuest, Lynette
71JUN301066/25/2021PMDPerez, Teresa
72JUN32144 Wc 10/16/196/25/2021PMDNikocevic, Bisera
73JUN261486/25/2021PMDMickens, Charlene, F
74JUN337276/25/2021PMDLEMPERT, CATHY
75JUN317836/25/2021PMDHodnett, Beverly, J
76JUN335256/25/2021BAHerring, Adeline
77JUN337366/25/2021PMDHernandez, Gabrielle
78JUN250756/25/2021PMDGrillo, Ann Marie
79JUN33847NF05/25/216/25/2021BAFresella, Malik
80JUN30826NF 12/24/186/25/2021PMDFeliciano, Diane
81JUN33834 NF 5/21/216/25/2021PMDElysee, Annie
82MAY322005/3/2021PMDSmith, Mark, J
83MAY33228 NF 08/27/195/3/2021PMDSiniscalchi, Angelica
84MAY335045/3/2021PMDSilva Honorio, Luiz
85MAY280325/3/2021PMDNeto, Artur, G
86MAY297685/3/2021PMDMiguel, Elida
87MAY333645/3/2021PMDMatias, Juan
88MAY332365/3/2021BAMartes, Natalie
89MAY330185/3/2021BAMardenborough, Adina
90MAY335255/3/2021BAHerring, Adeline
91MAY331875/3/2021PMDFanelli, Linda, K
92MAY298715/3/2021BADunham, John, L
93MAY132895/3/2021BADubois, Josephine, M
94MAY33557 Nf 3/2/215/3/2021BADixon, Alice
95MAY334385/3/2021BADavilmar, Rickerby
96MAY126925/3/2021BADaniel, Magdaline
97MAY335615/3/2021PMDCozart, Dana
98MAY278285/3/2021PMDCONTRERAS, YANET, R
99MAY334685/3/2021BACancel, Lucy, J
100MAY33542NF 2/26/215/3/2021BACallands, Stephanie
101MAY316185/3/2021PMDCalderon Chiara, Marlec
102MAY334145/3/2021BABaxter-Cahill, Shelia, C
103MAY107235/3/2021PMDBarcia, Esther
104MAY333785/3/2021PMDAshterman, Rowdon, L
105APR318494/30/2021PMDZambrano, Hugo, E
106APR333364/30/2021BAWarrington, Kim
107APR209094/30/2021PMDTiabo, Edmond
108APR330344/30/2021BASullivan, Desiree, T
109APR202994/30/2021BASmith, Joan, M
110APR291074/30/2021PMDSforza, John, A
111APR33511 Commercial4/30/2021BAScoca, Michael
112APR334634/30/2021BAPessoa, Linda, E
113APR175524/30/2021BAMorgan Barrows, Clover, J
114APR333634/30/2021BAMartinez, Maria, E
115APR332364/30/2021BAMartes, Natalie
116APR330184/30/2021BAMardenborough, Adina
117APR297684/7/2021PMDMiguel, Elida
118APR333634/7/2021BAMartinez, Maria, E
119APR335324/7/2021PMDMartinez, Eric
120APR335374/7/2021PMDMartinez Chavez, Jose, J
121APR332364/7/2021BAMartes, Natalie
122APR270174/7/2021PMDLiyanage, Neelamani, A
123APR150354/7/2021PMDHEWITT, VALERIE, A
124APR250754/7/2021PMDGrillo, Ann Marie
125APR32139 NF 10/26/194/7/2021BAFranco, Leticia
126APR30826NF 12/24/184/7/2021PMDFeliciano, Diane
127APR334414/7/2021PMDDouglass, Theresa
128APR33208NF10/08/20194/7/2021PMDDouglas, Carmen
129APR334384/7/2021BADavilmar, Rickerby
130APR335614/7/2021PMDCozart, Dana
131APR278284/7/2021PMDCONTRERAS, YANET, R
132APR123744/7/2021PMDConte, Susan, A
133APR334684/7/2021BACancel, Lucy, J
134APR216744/6/2021PMDWilliams, Evelyn
135APR212714/6/2021PMDVaughnwellington, Kerry, A
136APR33228 NF 08/27/194/6/2021PMDSiniscalchi, Angelica
137APR335474/6/2021PMDSimmons, Nataya
138APR193924/6/2021PMDRogers, Barbara, A
139APR335084/6/2021PMDRichards, Jovan
140APR331464/6/2021PMDPaolercio Jr, Joseph
141MAR31590 WC 6/8/193/3/2021PMDOsei, Margaret
142MAR250093/3/2021PMDLorusso, Linda, A
143MAR157413/3/2021PMDKeltz, Theodore, N
144MAR334333/3/2021PMDJimenez, Odilia Miranda
145MAR33223 Nf 11/19/20203/3/2021PMDGerano, Jennie
146MAR32139 NF 10/26/193/3/2021BAFranco, Leticia
147MAR30826NF 12/24/183/3/2021PMDFeliciano, Diane
148MAR33208NF10/08/20193/3/2021PMDDouglas, Carmen
149MAR333483/3/2021BADavis Elliott, Samantha
150MAR123743/3/2021PMDConte, Susan, A
151MAR33352 WC 10/20/20203/3/2021PMDBert, Annette
152MAR334283/3/2021PMDAmado Cardenas, Santiago
153MAR334133/2/2021ELCThomas, Kaesha, N
154MAR332803/2/2021PMDMadrid, Celia
155MAR327513/2/2021PMDHood, Ron
156MAR330623/2/2021PMDDeutsch, Ira
157MAR326583/2/2021ELCDavis, Electra, V
158MAR33361 Wc 1/15/213/1/2021BAWilliams, Ila
159MAR278333/1/2021PMDTOURI, CONCETTA
160MAR332363/1/2021BAMartes, Natalie
161MAR299803/1/2021PMDLima, Claudia
162MAR333453/1/2021PMDGrippi, Marta
163MAR33223 Nf 11/19/20203/1/2021PMDGerano, Jennie
164MAR32139 NF 10/26/193/1/2021BAFranco, Leticia
165MAR307643/1/2021PMDDibuono, Richard
166MAR32727 Nf 3/16/20203/1/2021BACea, Lorraine
167MAR32726 NF 03/16/20203/1/2021PMDCea, Jillian
168MAR106453/1/2021PMDBakalor, Donald
169MAR334283/1/2021PMDAmado Cardenas, Santiago
170FEB31590 WC 6/8/192/26/2021PMDOsei, Margaret
171FEB33353 Nf 01/16/212/26/2021PMDNagpal, Ankita
172FEB317832/26/2021PMDHodnett, Beverly, J
173FEB250752/26/2021PMDGrillo, Ann Marie
174FEB30826NF 12/24/182/26/2021PMDFeliciano, Diane
175FEB32932 Nf 5/15/20202/26/2021PMDEdwards, Angel
176FEB334282/26/2021PMDAmado Cardenas, Santiago
177FEB334132/25/2021ELCThomas, Kaesha, N
178FEB150352/25/2021PMDHEWITT, VALERIE, A
179JAN32934 WC 9/7/20201/4/2021BAJeanty, Marlene
180JAN293231/4/2021BAHizam, Sommia, R
181JAN330051/4/2021BAGodoy, Candelaria
182JAN33223 Nf 11/19/20201/4/2021PMDGerano, Jennie
183JAN330771/4/2021PMDGarcia, Kayla, L
184JAN123741/4/2021PMDConte, Susan, A
185JAN332411/4/2021BAClovis, Dionysia
186JAN120051/4/2021PMDCharles, Janet, O
187JAN318101/4/2021PMDAviles-Gumbs, Yvette
188JAN332521/4/2021BAAmparo, Marcelina
DETAIL MASTER
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Thank you for providing XL2BB sample data it makes it so much easier.
The formula itself if pretty straight forward and you can put this in C2 and copy it down and accross:
Excel Formula:
=COUNTIFS('DETAIL MASTER'!$B$2:$B$188,$A2,'DETAIL MASTER'!$A$2:$A$188,C$1)

Is there any reason you are not using a pivot table ?
What you are doing is a typical pivot table scenario.

Also as you have it, there are duplicates in the Summary sheet and also quite a number that are not in the summary sheet.

Even if you want to continue with your current format, you might want to at least change your DETAIL sheet to be an excel table.
You can then replace the $B$2:$B$188 to be table structured references so that it automatically expands as you add data to the table.

For example with the Detail table being called tblDetail,
the formula above would become

Excel Formula:
=COUNTIFS(tblDetail[Account Number],$A2,tblDetail[Month],C$1)
 
Upvote 0
Thank you for providing XL2BB sample data it makes it so much easier.
The formula itself if pretty straight forward and you can put this in C2 and copy it down and accross:
Excel Formula:
=COUNTIFS('DETAIL MASTER'!$B$2:$B$188,$A2,'DETAIL MASTER'!$A$2:$A$188,C$1)

Is there any reason you are not using a pivot table ?
What you are doing is a typical pivot table scenario.

Also as you have it, there are duplicates in the Summary sheet and also quite a number that are not in the summary sheet.

Even if you want to continue with your current format, you might want to at least change your DETAIL sheet to be an excel table.
You can then replace the $B$2:$B$188 to be table structured references so that it automatically expands as you add data to the table.

For example with the Detail table being called tblDetail,
the formula above would become

Excel Formula:
=COUNTIFS(tblDetail[Account Number],$A2,tblDetail[Month],C$1)
Thanks for the response. Normally, i use pivot tables a lot problem is that this spreadsheet has other columns in the spreadsheet that have to be filled in by staff and a pivot table wont work for what they need to accomplish.

Paula
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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