Calculating Number of Unique Values in Column

mgregory

New Member
Joined
Sep 3, 2015
Messages
7
Hello,
I am preparing a usage report for a school's Learning Management System. I have downloaded the raw data of each login into an Excel file. Each row down the worksheet represents one login. Each column across the page represents some identifying information about the user. These columns include; unique User ID; Date of the login, Time of the login, Role type (Staff, Parent, Student).

I have have found this formula to calculate the the number of unique logins =SUM(IF(FREQUENCY($C:$C,$C:$C)>0,1)). Of the nearly 155 000 logins, they have been made by 748 unique users. Excellent...I think that it is accurate.

Furthermore I need an extension of that formula to calculate the number Unique users based on the month and the role type.

Column A: Date
Column B: User ID
Column C: Sub Role-type
Column D: Role-type

Many Thanks

Mike
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Yes. I am afraid that there are this number of rows...perhaps this is problem...

The name of the sheet is "report-login (1)"

Yes they are? You are correct.

Define Lrow via Formulas | Name Manager as referring to:
Rich (BB code):

 =MATCH(9.99999999999999E+307,'report-login (1)'!$A:$A)

Define Dates as referring to:
Rich (BB code):

 ='report-login (1)'!$A$1:INDEX('report-login (1)'!$A:$A,Lrow)

Define Users as referring to:
Rich (BB code):

 ='report-login (1)'!$B$1:INDEX('report-login (1)'!$B:$B,Lrow)

Define SubRoles as referring to:
Rich (BB code):

 ='report-login (1)'!$C$1:INDEX('report-login (1)'!$C:$C,Lrow)

Define Roles as referring to:
Rich (BB code):

 ='report-login (1)'!$D$1:INDEX('report-login (1)'!$D:$D,Lrow)

Now invoke: Control+shift+enter...
Rich (BB code):

=SUM(IF(FREQUENCY(IF(ISNUMBER(Users),
    IF(Dates-DAY(Dates)+1=$F2,IF(Roles=F$27,Users))),Users),1))
 
Upvote 0
Thanks Again,

Still returning 0 could it be the date F2 formatted "1/08/2015 12:00:00 AM" Maybe there are no logins for that precise date and time. I will try reformatting it. Will the formula look for just this date or the whole month?

Mike
 
Upvote 0
Thanks Again,

Still returning 0 could it be the date F2 formatted "1/08/2015 12:00:00 AM" Maybe there are no logins for that precise date and time. I will try reformatting it. Will the formula look for just this date or the whole month?

Mike

The time bit...

Control+shift+enter, not just enter:
Rich (BB code):

=SUM(IF(FREQUENCY(IF(ISNUMBER(Users),
    IF(INT(Dates-DAY(Dates)+1)=INT($F2),IF(Roles=F$27,Users))),Users),1))
Without the time bits (without the INT calls), the formula would run faster...
 
Upvote 0

Forum statistics

Threads
1,216,102
Messages
6,128,853
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