SOLVED

Need help counting distinct values

%3CLINGO-SUB%20id%3D%22lingo-sub-1362510%22%20slang%3D%22en-US%22%3ENeed%20help%20counting%20distinct%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1362510%22%20slang%3D%22en-US%22%3E%3CP%3EHi!%3C%2FP%3E%3CP%3EI%20have%20a%20data%20set%20containing%20a%20list%20of%20people%20that%20participate%20in%20our%20meetings%20and%20I%20need%20help%20calculating%20the%20number%20of%20meetings%20organized%20in%20each%20location%20(%3F).%3C%2FP%3E%3CP%3EWe%20will%20continue%20to%20organize%20meetings%20and%20details%20of%20the%20same%20will%20be%20added%20to%20the%20second%20sheet%20(All%20Meetings)%20and%20I%20need%20the%20data%20to%20update%20on%20the%20first%20sheet%20(Sheet%201).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJames%20Raju%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1362510%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1362569%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20counting%20distinct%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1362569%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F578230%22%20target%3D%22_blank%22%3E%40James_Raju%3C%2FA%3E%26nbsp%3BHere%20you%20go.%20Please%20see%20attached.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fexcelsirji.com%2Fexcel-function-countif%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fexcelsirji.com%2Fexcel-function-countif%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1362691%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20counting%20distinct%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1362691%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F476378%22%20target%3D%22_blank%22%3E%40jukapil%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20help!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20data%20set%20contains%20details%20of%2052%20meetings%20in%20total%20(example%3A%20Meeting%20No.%201%20in%20S.no%202%20to%20232%20is%20the%20same%20meeting).%20I%20need%20help%20counting%20the%20number%20of%20meetings%20held%20in%20each%20location.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1362726%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20counting%20distinct%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1362726%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F578230%22%20target%3D%22_blank%22%3E%40James_Raju%3C%2FA%3E%26nbsp%3BIf%20you%20are%20open%20to%20a%20solution%20using%20Power%20Query%20(PQ)%20and%20Pivot%20Tables%2C%20please%20see%20attached.%20No%20need%20for%20COUNTIF%2C%20SUMIF%20etc.%20And%20you%20have%20the%20possibility%20to%20count%20distinct%20occurrences%20of%20meetings.%20Must%20say%20that%20I'm%20still%20a%20beginner%20in%20the%20area%20of%20PQ%20(coming%20from%20an%20Excel%20for%20Mac%20background)%2C%20so%20a%20real%20expert%20in%20this%20area%20can%20probably%20make%20it%20nicer.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1362727%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20counting%20distinct%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1362727%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F578230%22%20target%3D%22_blank%22%3E%40James_Raju%3C%2FA%3E%26nbsp%3Bsee%20attached.%20I%20listed%20all%20the%20meetings.%20Now%20you%20can%20see%20the%20count%20for%20each%20meeting.%20It%20counted%20the%20staff%20number%20and%20meeting%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1368745%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20counting%20distinct%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1368745%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F476378%22%20target%3D%22_blank%22%3E%40jukapil%3C%2FA%3EHi%20!%3C%2FP%3E%3CP%3EI'm%20really%20sorry%20buddy!%20It's%20still%20not%20what%20I%20was%20looking%20for.%20I%20would%20like%20to%20know%20how%20many%20meetings%20were%20held%20in%20each%20location.%20For%20example%3A%201%20Press%20Meeting%20and%205%20Staff%20meetings%20were%20organized%20in%20location%201.%20I%20arrived%20at%20this%20by%20filtering%20the%20data%20and%20excluding%20duplicates%2C%20but%20I%20had%20to%20do%20that%20manually.%20I%20need%20another%2C%20hopefully%20'automatic'%20method%20of%20getting%20this%20information.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAppreciate%20the%20help%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJames%20Raju%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1368753%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20counting%20distinct%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1368753%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3EHi!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20exactly%20what%20I%20wanted!%20I'm%20fairly%20new%20to%20excel%20and%20haven't%20gotten%20around%20to%20using%20Pivot%20tables%20and%20such.%20Is%20there%20a%20way%20for%20the%20Pivot%20table%20to%20update%20itself%20every%20time%20I%20update%20or%20add%20more%20information%20to%20the%20set%3F%20I've%20tried%20adding%20more%20data%20but%20the%20values%20on%20the%20table%20remain%20the%20same.%20Is%20there%20any%20way%20I%20can%20get%20it%20to%20include%20this%20new%20data%20into%20the%20results%20without%20having%20to%20make%20a%20new%20table%20each%20time%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJames%20Raju%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1369095%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20counting%20distinct%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1369095%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F578230%22%20target%3D%22_blank%22%3E%40James_Raju%3C%2FA%3E%26nbsp%3BThe%20file%20I%20sent%20you%20uses%20Pivot%20Tables%20based%20on%20a%20your%20data%20that%20gets%20%22manipulated%22%20in%20Power%20Query.%20I%20created%20a%20dynamic%20named%20range%20of%20your%20data%20table.%20When%20you%20add%20data%20and%20refresh%20the%20query%2C%20everything%20should%20update%20instantly.%20On%20the%20Data%20ribbon%20you%20should%20find%20an%20icon%20%22Refresh%20All%22.%20Try%20and%20see%20what%20happens.%20Would%20advise%20you%2C%20though%2C%20to%20learn%20about%20Power%20Query.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20are%20on%20a%20modern%20version%20of%20Excel%20that%20supports%20the%20functions%20UNIQUE%20and%20FILTER%2C%20you%20might%20want%20to%20use%20them%20in%20stead%20in%20your%20existing%20table%20that%20already%20works%20for%20the%20attendee%20count.%20I've%20attached%20a%20revised%20file%20for%20your%20reference.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi!

I have a data set containing a list of people that participate in our meetings and I need help calculating the number of meetings organized in each location (?).

We will continue to organize meetings and details of the same will be added to the second sheet (All Meetings) and I need the data to update on the first sheet (Sheet 1).

 

Thanks in advance!

 

James Raju

7 Replies
Highlighted

@James_Raju Here you go. Please see attached.

 

https://excelsirji.com/excel-function-countif/

Highlighted

@jukapil 

Hi!

 

Thanks for the help!

 

The data set contains details of 52 meetings in total (example: Meeting No. 1 in S.no 2 to 232 is the same meeting). I need help counting the number of meetings held in each location.

Highlighted

@James_Raju If you are open to a solution using Power Query (PQ) and Pivot Tables, please see attached. No need for COUNTIF, SUMIF etc. And you have the possibility to count distinct occurrences of meetings. Must say that I'm still a beginner in the area of PQ (coming from an Excel for Mac background), so a real expert in this area can probably make it nicer.

Highlighted

@James_Raju see attached. I listed all the meetings. Now you can see the count for each meeting. It counted the staff number and meeting

@jukapilHi !

I'm really sorry buddy! It's still not what I was looking for. I would like to know how many meetings were held in each location. For example: 1 Press Meeting and 5 Staff meetings were organized in location 1. I arrived at this by filtering the data and excluding duplicates, but I had to do that manually. I need another, hopefully 'automatic' method of getting this information.

 

Appreciate the help,

 

James Raju

Highlighted

@Riny_van_EekelenHi!

 

This is exactly what I wanted! I'm fairly new to excel and haven't gotten around to using Pivot tables and such. Is there a way for the Pivot table to update itself every time I update or add more information to the set? I've tried adding more data but the values on the table remain the same. Is there any way I can get it to include this new data into the results without having to make a new table each time?

 

Many thanks!

 

James Raju

Highlighted
Best Response confirmed by James_Raju (Occasional Contributor)
Solution

@James_Raju The file I sent you uses Pivot Tables based on a your data that gets "manipulated" in Power Query. I created a dynamic named range of your data table. When you add data and refresh the query, everything should update instantly. On the Data ribbon you should find an icon "Refresh All". Try and see what happens. Would advise you, though, to learn about Power Query.

 

If you are on a modern version of Excel that supports the functions UNIQUE and FILTER, you might want to use them in stead in your existing table that already works for the attendee count. I've attached a revised file for your reference.