count duplicate rows

msnewtothis

New Member
Joined
May 6, 2019
Messages
2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Product

[/TD]
[TD]Lot

[/TD]
[TD]Exp
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]1
[/TD]
[TD]X
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]1
[/TD]
[TD]X
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]2
[/TD]
[TD]Y
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]2
[/TD]
[TD]Y
[/TD]
[/TR]
</tbody>[/TABLE]

need function that will allow me to count different products with different lots from a list.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Product Lot Exp Qty
A 1 x 2
A 2 y 2

we barcode in our inventory and I need to be able to have a count of each product we receive and which how many of each lot.
 
Upvote 0
How about


Excel 2013/2016
ABCD
1ProductLotExp
2A1X2
3A1X2
4A2Y2
5A2Y2
Booking Data
Cell Formulas
RangeFormula
D2=COUNTIFS($A$2:$A$5,A2,$B$2:$B$5,B2)
 
Upvote 0
or with PowerQuery

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]Product[/td][td=bgcolor:#5B9BD5]Lot[/td][td=bgcolor:#5B9BD5]Exp[/td][td][/td][td=bgcolor:#70AD47]Product[/td][td=bgcolor:#70AD47]Lot[/td][td=bgcolor:#70AD47]Exp[/td][td=bgcolor:#70AD47]Count[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]A[/td][td=bgcolor:#DDEBF7]
1​
[/td][td=bgcolor:#DDEBF7]X[/td][td][/td][td=bgcolor:#E2EFDA]A[/td][td=bgcolor:#E2EFDA]
1​
[/td][td=bgcolor:#E2EFDA]X[/td][td=bgcolor:#E2EFDA]
2​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]A[/td][td]
1​
[/td][td]X[/td][td][/td][td]A[/td][td]
2​
[/td][td]Y[/td][td]
2​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]A[/td][td=bgcolor:#DDEBF7]
2​
[/td][td=bgcolor:#DDEBF7]Y[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]A[/td][td]
2​
[/td][td]Y[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


Code:
[SIZE=1]// Table3
let
    Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
    Group = Table.Group(Source, {"Product", "Lot", "Exp"}, {{"Count", each Table.RowCount(_), type number}})
in
    Group[/SIZE]
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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