Setting a value to duplicate datas using countif

Araxxor

New Member
Joined
Aug 13, 2014
Messages
5
Currently facing a problem with duplicate datas.

Invoice no.
Unique No.
Item Desc
1000123456
1
Pliers
1000123456
0
Nail
1000123456
0
Hammers
1222444444
1
Paper
1444222222
1
Nail
1223456789
1
Nail
1000123456
0
Planks
1112223334
1
Saw
1112223334
0
Hammer

<tbody>
</tbody>

So i would like to set those invoice numbers in the Unique No. column, those with duplicates a value of 1, (first entry of 1000123456 to 1, the rest a value of 0). Other invoice numbers with no duplicates (1222444444, 1444222222, etc to 1)

I tried using excel's sort and filter function but since my data has gaps in between, the rows without any data was set to 0 as well.

My goal is to find the number of Invoices issued without double counting the duplicates.

Any help is appreciated. Thanks in advance
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Maybe like this (feeling like formula is unnecessarily lengthy :) )


Excel 2010
ABCD
1Invoice no.Unique No.Item Desc
210001234561Pliers
310001234560Nail
410001234560Hammers
512224444441Paper
614442222221Nail
712234567891Nail
810001234560Planks
90
1011122233341Saw
1111122233340Hammer
Sheet2
Cell Formulas
RangeFormula
B2=IF(COUNTIF($A$2:$A$11,A2)=1,1,IF(AND(COUNTIF($A$2:$A$11,A2)>1,COUNTIF($A$2:A2,A2)=1),1,0))
 
Upvote 0
maybe something like...

Excel 2012
ABC
1Invoice no.Unique No.Item Desc
210001234561Pliers
310001234560Nail
410001234560Hammers
512224444441Paper
614442222221Nail
712234567891Nail
810001234560Planks
9
1011122233341Saw
1111122233340Hammer

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
B2=IF(A2="","",N(COUNTIF($A$2:A2,A2)=1))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,406
Messages
6,119,330
Members
448,888
Latest member
Arle8907

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