count without duplicate

kelvin_9

Active Member
Joined
Mar 6, 2015
Messages
444
Office Version
  1. 2019
greeting to all

i was wondering is there any formula that i can quickly return how many order SN total in daily without duplicate calculation?
example: 11 order on 12/29/2023, 18 order on 12/23/2023

Book1
ACE
1Order SnCreated AtUpdated At
223122012181247290812/20/2023 12:18:11 PM12/29/2023
323122012181247290812/20/2023 12:18:11 PM12/29/2023
423122012181247290812/20/2023 12:18:11 PM12/29/2023
523122012181247290812/20/2023 12:18:11 PM12/29/2023
623122113293850664312/21/2023 1:29:38 PM12/29/2023
723122113293850664312/21/2023 1:29:38 PM12/29/2023
823122113293850664312/21/2023 1:29:38 PM12/29/2023
923122113343088138112/21/2023 1:34:30 PM12/29/2023
1023122112364830432212/21/2023 12:36:48 PM12/29/2023
1123122112041678641312/21/2023 12:04:16 PM12/29/2023
1223122112173964697812/21/2023 12:17:39 PM12/29/2023
1323122112061887234512/21/2023 12:06:18 PM12/29/2023
1423122112044492327912/21/2023 12:04:44 PM12/29/2023
1523122112021075330512/21/2023 12:02:10 PM12/29/2023
1623122112590730557512/21/2023 12:59:07 PM12/29/2023
1723122112274392043912/21/2023 12:27:43 PM12/29/2023
1823122112274392043912/21/2023 12:27:43 PM12/29/2023
1923122112274392043912/21/2023 12:27:43 PM12/29/2023
2023122323425474686912/23/2023 11:42:54 PM12/23/2023
2123122323374261449312/23/2023 11:37:42 PM12/23/2023
2223122322261068046912/23/2023 10:26:10 PM12/23/2023
2323122320291110686012/23/2023 8:29:11 PM12/23/2023
2423122320291110686012/23/2023 8:29:11 PM12/23/2023
2523122318363278373212/23/2023 6:36:32 PM12/23/2023
2623122318363278373212/23/2023 6:36:32 PM12/23/2023
2723122318363278373212/23/2023 6:36:32 PM12/23/2023
2823122318021073513312/23/2023 6:02:10 PM12/23/2023
2923122317580230451312/23/2023 5:58:02 PM12/23/2023
3023122317175182098312/23/2023 5:17:51 PM12/23/2023
3123122317175182098312/23/2023 5:17:51 PM12/23/2023
3223122315272869865012/23/2023 3:27:28 PM12/23/2023
3323122314123488995912/23/2023 2:12:34 PM12/23/2023
3423122313492547787412/23/2023 1:49:25 PM12/23/2023
3523122312424390431712/23/2023 12:42:43 PM12/23/2023
3623122312052580813212/23/2023 12:05:25 PM12/23/2023
3723122310485254666512/23/2023 10:48:52 AM12/23/2023
3823122303244757073412/23/2023 3:24:47 AM12/23/2023
3923122300550963460912/23/2023 12:55:09 AM12/23/2023
4023122300521884820112/23/2023 12:52:18 AM12/23/2023
4123122300521884820112/23/2023 12:52:18 AM12/23/2023
4223122300500986120112/23/2023 12:50:09 AM12/23/2023
4323122223450375330812/22/2023 11:45:03 PM12/22/2023
4423122223232060761612/22/2023 11:23:20 PM12/22/2023
4523122223232060761612/22/2023 11:23:20 PM12/22/2023
4623122222551643142712/22/2023 10:55:16 PM12/22/2023
4723122222250472779512/22/2023 10:25:04 PM12/22/2023
4823122222194066971112/22/2023 10:19:40 PM12/22/2023
4923122220163645864612/22/2023 8:16:36 PM12/22/2023
5023122220144079721212/22/2023 8:14:40 PM12/22/2023
5123122220121838867412/22/2023 8:12:18 PM12/22/2023
5223122220112228353712/22/2023 8:11:22 PM12/22/2023
5323122220112228353712/22/2023 8:11:22 PM12/22/2023
5423122220091578892412/22/2023 8:09:15 PM12/22/2023
5523122220091578892412/22/2023 8:09:15 PM12/22/2023
5623122219422227593312/22/2023 7:42:22 PM12/22/2023
5723122219341160318812/22/2023 7:34:11 PM12/22/2023
5823122219341160318812/22/2023 7:34:11 PM12/22/2023
5923122219301766232112/22/2023 7:30:17 PM12/22/2023
6023122219242440067312/22/2023 7:24:24 PM12/22/2023
6123122219242440067312/22/2023 7:24:24 PM12/22/2023
6223122219242440067312/22/2023 7:24:24 PM12/22/2023
6323122219011953773112/22/2023 7:01:19 PM12/22/2023
6423122219011953773112/22/2023 7:01:19 PM12/22/2023
6523122219011953773112/22/2023 7:01:19 PM12/22/2023
6623122218535888480212/22/2023 6:53:58 PM12/22/2023
6723122218470316436712/22/2023 6:47:03 PM12/22/2023
6823122218314396781612/22/2023 6:31:43 PM12/22/2023
6923122218191293013712/22/2023 6:19:12 PM12/22/2023
7023122218171973171912/22/2023 6:17:19 PM12/22/2023
7123122218094523186112/22/2023 6:09:45 PM12/22/2023
7223122218094523186112/22/2023 6:09:45 PM12/22/2023
7323122218030366178112/22/2023 6:03:03 PM12/22/2023
7423122218030366178112/22/2023 6:03:03 PM12/22/2023
7523122217552089584912/22/2023 5:55:20 PM12/22/2023
7623122217524646693712/22/2023 5:52:46 PM12/22/2023
7723122217524646693712/22/2023 5:52:46 PM12/22/2023
Sheet2
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
sorry for misunderstanding,

F1 will be today(12/29/2023), F2 will be next(12/23/2023)..... etc
i want the formula on G1, G2.....

thanks for your reply
 
Upvote 0
To not mess with your original data I copied Column C to Column D and Column A to Column E then ran this macro.

VBA Code:
Sub CountUnique()
'
' CountUnique Macro
'

'
    Range("D2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Range(Selection, Selection.End(xlToRight)).Select
    ActiveSheet.Range("$D$1:$E$77").RemoveDuplicates Columns:=Array(1, 2), Header _
        :=xlYes
    Application.CutCopyMode = False
    Application.CutCopyMode = False
    ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
        "Sheet2!R1C4:R77C5", Version:=8).CreatePivotTable TableDestination:= _
        "Sheet2!R1C7", TableName:="PivotTable3", DefaultVersion:=8
    Sheets("Sheet2").Select
    Cells(1, 7).Select
    With ActiveSheet.PivotTables("PivotTable3")
        .ColumnGrand = True
        .HasAutoFormat = True
        .DisplayErrorString = False
        .DisplayNullString = True
        .EnableDrilldown = True
        .ErrorString = ""
        .MergeLabels = False
        .NullString = ""
        .PageFieldOrder = 2
        .PageFieldWrapCount = 0
        .PreserveFormatting = True
        .RowGrand = True
        .SaveData = True
        .PrintTitles = False
        .RepeatItemsOnEachPrintedPage = True
        .TotalsAnnotation = False
        .CompactRowIndent = 1
        .InGridDropZones = False
        .DisplayFieldCaptions = True
        .DisplayMemberPropertyTooltips = False
        .DisplayContextTooltips = True
        .ShowDrillIndicators = True
        .PrintDrillIndicators = False
        .AllowMultipleFilters = False
        .SortUsingCustomLists = True
        .FieldListSortAscending = False
        .ShowValuesRow = False
        .CalculatedMembersInFilters = False
        .RowAxisLayout xlCompactRow
    End With
    With ActiveSheet.PivotTables("PivotTable3").PivotCache
        .RefreshOnFileOpen = False
        .MissingItemsLimit = xlMissingItemsDefault
    End With
    ActiveSheet.PivotTables("PivotTable3").RepeatAllLabels xlRepeatLabels
    With ActiveSheet.PivotTables("PivotTable3").PivotFields("Updated At")
        .Orientation = xlRowField
        .Position = 1
    End With
    ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _
        "PivotTable3").PivotFields("Order Sn"), "Sum of Order Sn", xlSum
    With ActiveSheet.PivotTables("PivotTable3").PivotFields("Sum of Order Sn")
        .Caption = "Count of Order Sn"
        .Function = xlCount
    End With
    ActiveSheet.PivotTables("PivotTable3").PivotSelect "'Updated At'[All]", _
        xlLabelOnly + xlFirstRow, True
    With ActiveSheet.PivotTables("PivotTable3").PivotFields("Updated At")
        .PivotItems("(blank)").Visible = False
    End With
    Range("F1").Select
End Sub
 
Upvote 0
How about?:

Libro1.xlsx
ABCDEFGH
1Order SnCreated AtUpdated AtTotal # of unique order Sn
223122012181247200020/12/2023 12:1829/12/2023 14:4553
323122012181247200020/12/2023 12:1829/12/2023 14:45
423122012181247200020/12/2023 12:1829/12/2023 14:45Date# of Unique Order Sn by date
523122012181247200020/12/2023 12:1829/12/2023 14:4520/12/20231
623122113293850600021/12/2023 13:2929/12/2023 12:3921/12/202310
723122113293850600021/12/2023 13:2929/12/2023 12:3922/12/202324
823122113293850600021/12/2023 13:2929/12/2023 12:3923/12/202318
923122113343088100021/12/2023 13:3429/12/2023 12:35
1023122112364830400021/12/2023 12:3629/12/2023 11:24
1123122112041678600021/12/2023 12:0429/12/2023 11:12
1223122112173964600021/12/2023 12:1729/12/2023 11:11
1323122112061887200021/12/2023 12:0629/12/2023 10:23
1423122112044492300021/12/2023 12:0429/12/2023 10:20
1523122112021075300021/12/2023 12:0229/12/2023 10:18
1623122112590730500021/12/2023 12:5929/12/2023 10:15
1723122112274392000021/12/2023 12:2729/12/2023 10:14
1823122112274392000021/12/2023 12:2729/12/2023 10:14
1923122112274392000021/12/2023 12:2729/12/2023 10:14
2023122323425474600023/12/2023 23:4223/12/2023 23:43
2123122323374261400023/12/2023 23:3723/12/2023 23:37
2223122322261068000023/12/2023 22:2623/12/2023 22:26
2323122320291110600023/12/2023 20:2923/12/2023 20:29
2423122320291110600023/12/2023 20:2923/12/2023 20:29
2523122318363278300023/12/2023 18:3623/12/2023 18:36
2623122318363278300023/12/2023 18:3623/12/2023 18:36
2723122318363278300023/12/2023 18:3623/12/2023 18:36
2823122318021073500023/12/2023 18:0223/12/2023 18:03
2923122317580230400023/12/2023 17:5823/12/2023 17:59
3023122317175182000023/12/2023 17:1723/12/2023 17:19
3123122317175182000023/12/2023 17:1723/12/2023 17:19
3223122315272869800023/12/2023 15:2723/12/2023 15:27
3323122314123488900023/12/2023 14:1223/12/2023 14:13
3423122313492547700023/12/2023 13:4923/12/2023 13:49
3523122312424390400023/12/2023 12:4223/12/2023 12:43
3623122312052580800023/12/2023 12:0523/12/2023 12:05
3723122310485254600023/12/2023 10:4823/12/2023 11:07
3823122303244757000023/12/2023 03:2423/12/2023 03:25
3923122300550963400023/12/2023 00:5523/12/2023 00:55
4023122300521884800023/12/2023 00:5223/12/2023 00:54
4123122300521884800023/12/2023 00:5223/12/2023 00:54
4223122300500986100023/12/2023 00:5023/12/2023 00:50
4323122223450375300022/12/2023 23:4522/12/2023 23:45
4423122223232060700022/12/2023 23:2322/12/2023 23:24
4523122223232060700022/12/2023 23:2322/12/2023 23:24
4623122222551643100022/12/2023 22:5522/12/2023 22:55
4723122222250472700022/12/2023 22:2522/12/2023 22:26
4823122222194066900022/12/2023 22:1922/12/2023 22:20
4923122220163645800022/12/2023 20:1622/12/2023 20:17
5023122220144079700022/12/2023 20:1422/12/2023 20:15
5123122220121838800022/12/2023 20:1222/12/2023 20:14
5223122220112228300022/12/2023 20:1122/12/2023 20:12
5323122220112228300022/12/2023 20:1122/12/2023 20:12
5423122220091578800022/12/2023 20:0922/12/2023 20:11
5523122220091578800022/12/2023 20:0922/12/2023 20:11
5623122219422227500022/12/2023 19:4222/12/2023 19:43
5723122219341160300022/12/2023 19:3422/12/2023 19:34
5823122219341160300022/12/2023 19:3422/12/2023 19:34
5923122219301766200022/12/2023 19:3022/12/2023 19:30
6023122219242440000022/12/2023 19:2422/12/2023 19:26
6123122219242440000022/12/2023 19:2422/12/2023 19:26
6223122219242440000022/12/2023 19:2422/12/2023 19:26
6323122219011953700022/12/2023 19:0122/12/2023 19:02
6423122219011953700022/12/2023 19:0122/12/2023 19:02
6523122219011953700022/12/2023 19:0122/12/2023 19:02
6623122218535888400022/12/2023 18:5322/12/2023 18:54
6723122218470316400022/12/2023 18:4722/12/2023 18:47
6823122218314396700022/12/2023 18:3122/12/2023 18:33
6923122218191293000022/12/2023 18:1922/12/2023 18:19
7023122218171973100022/12/2023 18:1722/12/2023 18:17
7123122218094523100022/12/2023 18:0922/12/2023 18:10
7223122218094523100022/12/2023 18:0922/12/2023 18:10
7323122218030366100022/12/2023 18:0322/12/2023 18:05
7423122218030366100022/12/2023 18:0322/12/2023 18:05
7523122217552089500022/12/2023 17:5522/12/2023 17:55
7623122217524646600022/12/2023 17:5222/12/2023 17:52
7723122217524646600022/12/2023 17:5222/12/2023 17:52
Hoja1
Cell Formulas
RangeFormula
H2H2=SUM((FREQUENCY(MATCH($A$2:$A$77,$A$2:$A$77,0),MATCH($A$2:$A$77,$A$2:$A$77,0))>0)*1)
H5:H8H5=SUM((FREQUENCY(MATCH($A$2:$A$77,$A$2:$A$77,0)*(INT($C$2:$C$77)=$G5),MATCH($A$2:$A$77,$A$2:$A$77,0)*(INT($C$2:$C$77)=$G5))>0)*1)-1
 
Upvote 0
To not mess with your original data I copied Column C to Column D and Column A to Column E then ran this macro.

VBA Code:
Sub CountUnique()
'
' CountUnique Macro
'

'
    Range("D2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Range(Selection, Selection.End(xlToRight)).Select
    ActiveSheet.Range("$D$1:$E$77").RemoveDuplicates Columns:=Array(1, 2), Header _
        :=xlYes
    Application.CutCopyMode = False
    Application.CutCopyMode = False
    ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
        "Sheet2!R1C4:R77C5", Version:=8).CreatePivotTable TableDestination:= _
        "Sheet2!R1C7", TableName:="PivotTable3", DefaultVersion:=8
    Sheets("Sheet2").Select
    Cells(1, 7).Select
    With ActiveSheet.PivotTables("PivotTable3")
        .ColumnGrand = True
        .HasAutoFormat = True
        .DisplayErrorString = False
        .DisplayNullString = True
        .EnableDrilldown = True
        .ErrorString = ""
        .MergeLabels = False
        .NullString = ""
        .PageFieldOrder = 2
        .PageFieldWrapCount = 0
        .PreserveFormatting = True
        .RowGrand = True
        .SaveData = True
        .PrintTitles = False
        .RepeatItemsOnEachPrintedPage = True
        .TotalsAnnotation = False
        .CompactRowIndent = 1
        .InGridDropZones = False
        .DisplayFieldCaptions = True
        .DisplayMemberPropertyTooltips = False
        .DisplayContextTooltips = True
        .ShowDrillIndicators = True
        .PrintDrillIndicators = False
        .AllowMultipleFilters = False
        .SortUsingCustomLists = True
        .FieldListSortAscending = False
        .ShowValuesRow = False
        .CalculatedMembersInFilters = False
        .RowAxisLayout xlCompactRow
    End With
    With ActiveSheet.PivotTables("PivotTable3").PivotCache
        .RefreshOnFileOpen = False
        .MissingItemsLimit = xlMissingItemsDefault
    End With
    ActiveSheet.PivotTables("PivotTable3").RepeatAllLabels xlRepeatLabels
    With ActiveSheet.PivotTables("PivotTable3").PivotFields("Updated At")
        .Orientation = xlRowField
        .Position = 1
    End With
    ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _
        "PivotTable3").PivotFields("Order Sn"), "Sum of Order Sn", xlSum
    With ActiveSheet.PivotTables("PivotTable3").PivotFields("Sum of Order Sn")
        .Caption = "Count of Order Sn"
        .Function = xlCount
    End With
    ActiveSheet.PivotTables("PivotTable3").PivotSelect "'Updated At'[All]", _
        xlLabelOnly + xlFirstRow, True
    With ActiveSheet.PivotTables("PivotTable3").PivotFields("Updated At")
        .PivotItems("(blank)").Visible = False
    End With
    Range("F1").Select
End Sub
thank you for your reply, BishopDesigns

is it means, only column D and E 2 columns and run the macro?
it stopped here:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Sheet2!R1C4:R77C5", Version:=8).CreatePivotTable TableDestination:= _
"Sheet2!R1C7", TableName:="PivotTable3", DefaultVersion:=8
 
Upvote 0
How about?:

Libro1.xlsx
ABCDEFGH
1Order SnCreated AtUpdated AtTotal # of unique order Sn
223122012181247200020/12/2023 12:1829/12/2023 14:4553
323122012181247200020/12/2023 12:1829/12/2023 14:45
423122012181247200020/12/2023 12:1829/12/2023 14:45Date# of Unique Order Sn by date
523122012181247200020/12/2023 12:1829/12/2023 14:4520/12/20231
623122113293850600021/12/2023 13:2929/12/2023 12:3921/12/202310
723122113293850600021/12/2023 13:2929/12/2023 12:3922/12/202324
823122113293850600021/12/2023 13:2929/12/2023 12:3923/12/202318
923122113343088100021/12/2023 13:3429/12/2023 12:35
1023122112364830400021/12/2023 12:3629/12/2023 11:24
1123122112041678600021/12/2023 12:0429/12/2023 11:12
1223122112173964600021/12/2023 12:1729/12/2023 11:11
1323122112061887200021/12/2023 12:0629/12/2023 10:23
1423122112044492300021/12/2023 12:0429/12/2023 10:20
1523122112021075300021/12/2023 12:0229/12/2023 10:18
1623122112590730500021/12/2023 12:5929/12/2023 10:15
1723122112274392000021/12/2023 12:2729/12/2023 10:14
1823122112274392000021/12/2023 12:2729/12/2023 10:14
1923122112274392000021/12/2023 12:2729/12/2023 10:14
2023122323425474600023/12/2023 23:4223/12/2023 23:43
2123122323374261400023/12/2023 23:3723/12/2023 23:37
2223122322261068000023/12/2023 22:2623/12/2023 22:26
2323122320291110600023/12/2023 20:2923/12/2023 20:29
2423122320291110600023/12/2023 20:2923/12/2023 20:29
2523122318363278300023/12/2023 18:3623/12/2023 18:36
2623122318363278300023/12/2023 18:3623/12/2023 18:36
2723122318363278300023/12/2023 18:3623/12/2023 18:36
2823122318021073500023/12/2023 18:0223/12/2023 18:03
2923122317580230400023/12/2023 17:5823/12/2023 17:59
3023122317175182000023/12/2023 17:1723/12/2023 17:19
3123122317175182000023/12/2023 17:1723/12/2023 17:19
3223122315272869800023/12/2023 15:2723/12/2023 15:27
3323122314123488900023/12/2023 14:1223/12/2023 14:13
3423122313492547700023/12/2023 13:4923/12/2023 13:49
3523122312424390400023/12/2023 12:4223/12/2023 12:43
3623122312052580800023/12/2023 12:0523/12/2023 12:05
3723122310485254600023/12/2023 10:4823/12/2023 11:07
3823122303244757000023/12/2023 03:2423/12/2023 03:25
3923122300550963400023/12/2023 00:5523/12/2023 00:55
4023122300521884800023/12/2023 00:5223/12/2023 00:54
4123122300521884800023/12/2023 00:5223/12/2023 00:54
4223122300500986100023/12/2023 00:5023/12/2023 00:50
4323122223450375300022/12/2023 23:4522/12/2023 23:45
4423122223232060700022/12/2023 23:2322/12/2023 23:24
4523122223232060700022/12/2023 23:2322/12/2023 23:24
4623122222551643100022/12/2023 22:5522/12/2023 22:55
4723122222250472700022/12/2023 22:2522/12/2023 22:26
4823122222194066900022/12/2023 22:1922/12/2023 22:20
4923122220163645800022/12/2023 20:1622/12/2023 20:17
5023122220144079700022/12/2023 20:1422/12/2023 20:15
5123122220121838800022/12/2023 20:1222/12/2023 20:14
5223122220112228300022/12/2023 20:1122/12/2023 20:12
5323122220112228300022/12/2023 20:1122/12/2023 20:12
5423122220091578800022/12/2023 20:0922/12/2023 20:11
5523122220091578800022/12/2023 20:0922/12/2023 20:11
5623122219422227500022/12/2023 19:4222/12/2023 19:43
5723122219341160300022/12/2023 19:3422/12/2023 19:34
5823122219341160300022/12/2023 19:3422/12/2023 19:34
5923122219301766200022/12/2023 19:3022/12/2023 19:30
6023122219242440000022/12/2023 19:2422/12/2023 19:26
6123122219242440000022/12/2023 19:2422/12/2023 19:26
6223122219242440000022/12/2023 19:2422/12/2023 19:26
6323122219011953700022/12/2023 19:0122/12/2023 19:02
6423122219011953700022/12/2023 19:0122/12/2023 19:02
6523122219011953700022/12/2023 19:0122/12/2023 19:02
6623122218535888400022/12/2023 18:5322/12/2023 18:54
6723122218470316400022/12/2023 18:4722/12/2023 18:47
6823122218314396700022/12/2023 18:3122/12/2023 18:33
6923122218191293000022/12/2023 18:1922/12/2023 18:19
7023122218171973100022/12/2023 18:1722/12/2023 18:17
7123122218094523100022/12/2023 18:0922/12/2023 18:10
7223122218094523100022/12/2023 18:0922/12/2023 18:10
7323122218030366100022/12/2023 18:0322/12/2023 18:05
7423122218030366100022/12/2023 18:0322/12/2023 18:05
7523122217552089500022/12/2023 17:5522/12/2023 17:55
7623122217524646600022/12/2023 17:5222/12/2023 17:52
7723122217524646600022/12/2023 17:5222/12/2023 17:52
Hoja1
Cell Formulas
RangeFormula
H2H2=SUM((FREQUENCY(MATCH($A$2:$A$77,$A$2:$A$77,0),MATCH($A$2:$A$77,$A$2:$A$77,0))>0)*1)
H5:H8H5=SUM((FREQUENCY(MATCH($A$2:$A$77,$A$2:$A$77,0)*(INT($C$2:$C$77)=$G5),MATCH($A$2:$A$77,$A$2:$A$77,0)*(INT($C$2:$C$77)=$G5))>0)*1)-1
thank you for your reply, felixstraube

first of all, you have changed the date format to mm/dd/yyyy from dd/mm/yyyy
second, i have try your formula but it dosent work well like you, anything i did wrong?
last but not least, i copied column a to column m and then remove duplicate, it show 28 instead of your 27 because of the first and second row

Mrh Online - Order with SOH (Prompt) Production - Pick Up - Limited Store - Hourly2023-12-29-20-01-01.xlsx
ABCDEFGHIJKLM
1Order SnCreated AtUpdated At231220120020194113
223122012002019411312/20/2023 12:00:20 PM12/29/202327231220120020194113
323122012002019411312/20/2023 12:00:20 PM12/29/2023231220120041991140
423122012002019411312/20/2023 12:00:20 PM12/29/2023231220120043888627
523122012004199114012/20/2023 12:00:41 PM12/20/202312/29/20230231220120058221219
623122012004388862712/20/2023 12:00:43 PM12/20/202312/28/20230231220120141307378
723122012004388862712/20/2023 12:00:43 PM12/20/202327/12/20230231220120207370783
823122012005822121912/20/2023 12:00:58 PM12/29/202326/12/20230231220120222477999
923122012014130737812/20/2023 12:01:41 PM12/29/2023231220120232797837
1023122012014130737812/20/2023 12:01:41 PM12/29/2023231220120236501293
1123122012014130737812/20/2023 12:01:41 PM12/29/2023231220120236570287
1223122012014130737812/20/2023 12:01:41 PM12/29/2023231220120241652868
1323122012014130737812/20/2023 12:01:41 PM12/29/2023231220120244585174
1423122012020737078312/20/2023 12:02:07 PM12/20/2023231220120247238681
1523122012020737078312/20/2023 12:02:07 PM12/20/2023231220120248886282
1623122012020737078312/20/2023 12:02:07 PM12/20/2023231220120248998590
1723122012022247799912/20/2023 12:02:22 PM12/29/2023231220120253268594
1823122012022247799912/20/2023 12:02:22 PM12/29/2023231220120257174214
1923122012022247799912/20/2023 12:02:22 PM12/29/2023231220120301611839
2023122012022247799912/20/2023 12:02:22 PM12/29/2023231220120303280168
2123122012022247799912/20/2023 12:02:22 PM12/29/2023231220120305387157
2223122012022247799912/20/2023 12:02:22 PM12/29/2023231220120308963548
2323122012022247799912/20/2023 12:02:22 PM12/29/2023231220120309602478
2423122012022247799912/20/2023 12:02:22 PM12/29/2023231220120312547785
2523122012022247799912/20/2023 12:02:22 PM12/29/2023231220120314205563
2623122012023279783712/20/2023 12:02:32 PM12/29/2023231220120322898580
2723122012023650129312/20/2023 12:02:36 PM12/29/2023231220120329221484
2823122012023657028712/20/2023 12:02:36 PM12/29/2023231220120329697299
2923122012024165286812/20/2023 12:02:41 PM12/29/2023
3023122012024458517412/20/2023 12:02:43 PM12/29/2023
3123122012024723868112/20/2023 12:02:47 PM12/20/2023
3223122012024723868112/20/2023 12:02:47 PM12/20/2023
3323122012024888628212/20/2023 12:02:48 PM12/20/2023
3423122012024888628212/20/2023 12:02:48 PM12/20/2023
3523122012024888628212/20/2023 12:02:48 PM12/20/2023
3623122012024899859012/20/2023 12:02:48 PM12/20/2023
3723122012024899859012/20/2023 12:02:48 PM12/20/2023
3823122012024899859012/20/2023 12:02:48 PM12/20/2023
3923122012024899859012/20/2023 12:02:48 PM12/20/2023
4023122012025326859412/20/2023 12:02:53 PM12/29/2023
4123122012025326859412/20/2023 12:02:53 PM12/29/2023
4223122012025326859412/20/2023 12:02:53 PM12/29/2023
4323122012025326859412/20/2023 12:02:53 PM12/29/2023
4423122012025326859412/20/2023 12:02:53 PM12/29/2023
4523122012025326859412/20/2023 12:02:53 PM12/29/2023
4623122012025326859412/20/2023 12:02:53 PM12/29/2023
4723122012025717421412/20/2023 12:02:57 PM12/20/2023
4823122012025717421412/20/2023 12:02:57 PM12/20/2023
4923122012025717421412/20/2023 12:02:57 PM12/20/2023
5023122012030161183912/20/2023 12:03:01 PM12/20/2023
5123122012030161183912/20/2023 12:03:01 PM12/20/2023
5223122012030328016812/20/2023 12:03:03 PM12/20/2023
5323122012030328016812/20/2023 12:03:03 PM12/20/2023
5423122012030328016812/20/2023 12:03:03 PM12/20/2023
5523122012030538715712/20/2023 12:03:05 PM12/20/2023
5623122012030896354812/20/2023 12:03:08 PM12/29/2023
5723122012030960247812/20/2023 12:03:09 PM12/20/2023
5823122012030960247812/20/2023 12:03:09 PM12/20/2023
5923122012031254778512/20/2023 12:03:12 PM12/20/2023
6023122012031254778512/20/2023 12:03:12 PM12/20/2023
6123122012031420556312/20/2023 12:03:14 PM12/20/2023
6223122012031420556312/20/2023 12:03:14 PM12/20/2023
6323122012031420556312/20/2023 12:03:14 PM12/20/2023
6423122012032289858012/20/2023 12:03:22 PM12/29/2023
6523122012032289858012/20/2023 12:03:22 PM12/29/2023
6623122012032289858012/20/2023 12:03:22 PM12/29/2023
6723122012032289858012/20/2023 12:03:22 PM12/29/2023
6823122012032289858012/20/2023 12:03:22 PM12/29/2023
6923122012032289858012/20/2023 12:03:22 PM12/29/2023
7023122012032922148412/20/2023 12:03:29 PM12/20/2023
7123122012032922148412/20/2023 12:03:29 PM12/20/2023
7223122012032922148412/20/2023 12:03:29 PM12/20/2023
7323122012032922148412/20/2023 12:03:29 PM12/20/2023
7423122012032922148412/20/2023 12:03:29 PM12/20/2023
7523122012032969729912/20/2023 12:03:29 PM12/20/2023
7623122012032969729912/20/2023 12:03:29 PM12/20/2023
7723122012032969729912/20/2023 12:03:29 PM12/20/2023
Sheet1
Cell Formulas
RangeFormula
H2H2=SUM((FREQUENCY(MATCH($A$2:$A$77,$A$2:$A$77,0),MATCH($A$2:$A$77,$A$2:$A$77,0))>0)*1)
H5:H8H5=SUM((FREQUENCY(MATCH($A$2:$A$77,$A$2:$A$77,0)*(INT($C$2:$C$77)=$G5),MATCH($A$2:$A$77,$A$2:$A$77,0)*(INT($C$2:$C$77)=$G5))>0)*1)-1


thank you very much for your guidance
 
Upvote 0
thank you for your reply, BishopDesigns

is it means, only column D and E 2 columns and run the macro?
it stopped here:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Sheet2!R1C4:R77C5", Version:=8).CreatePivotTable TableDestination:= _
"Sheet2!R1C7", TableName:="PivotTable3", DefaultVersion:=8
I believe you need to change all occurrences of "Sheet2" to the name of the tab you have in your document
 
Upvote 0
In order to get a distinct count in a pivot table, you would have to load the data into the data model, not use a regular pivot table.
 
Upvote 0
Here is the file I created.
Hope this works. I changed the format like you need it mm/dd/yyyy.
And counted the distinct values for each date by hand using remove duplicates. I get the values the formula yields

CountWithoutDuplicates.zip

Let me know if this works.
 
Upvote 0
Here is the file I created.
Hope this works. I changed the format like you need it mm/dd/yyyy.
And counted the distinct values for each date by hand using remove duplicates. I get the values the formula yields

CountWithoutDuplicates.zip

Let me know if this works.
thank you very much for your reply, felixstraube

anything i mess up which my fomula below is not wokring
ps: data range set as 1000, ctrl alt enter
=SUM((FREQUENCY(MATCH($A$2:$A$1000, $A$2:$A$1000, 0) * (INT($C$2:$C$1000) = $AF7), MATCH($A$2:$A$1000, $A$2:$A$1000, 0) * (INT($C$2:$C$1000) = $AF7)) > 0) * 1) - 1

thank you very much
 
Upvote 0

Forum statistics

Threads
1,215,102
Messages
6,123,097
Members
449,096
Latest member
provoking

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