Hi,
I'm new to VBA. I've attached the document here. I need a macro to compare the sheet 2 Item number data's with sheet 1 to find the duplicates.
After finding the duplicate it has to calculate the total count in the Duplicate count cell as a Order.
Waiting for Positive response.
Thanks in advance
Regards,
Kishore
item Number 1 has a value of 2 in the Duplicate Count column, but that number can be found only once in Sheet2, can you clarify?
Is the vba solution really necessary? A simple formula will return that answer more easily:
=SUMPRODUCT((Sheet2!A:A=A2)*1)
Or using countif formula, simple way out
=COUNTIF(Sheet2!$A$2:$A$19,A2) |
=COUNTIF(Sheet2!$A$2:$A$19,A3) |
=COUNTIF(Sheet2!$A$2:$A$19,A4) |
=COUNTIF(Sheet2!$A$2:$A$19,A5) |
=COUNTIF(Sheet2!$A$2:$A$19,A6) |
=COUNTIF(Sheet2!$A$2:$A$19,A7) |
=COUNTIF(Sheet2!$A$2:$A$19,A8) |
=COUNTIF(Sheet2!$A$2:$A$19,A9) |
=COUNTIF(Sheet2!$A$2:$A$19,A10) |
=COUNTIF(Sheet2!$A$2:$A$19,A11) |
Thanks for the response folks.
By using the formula how can I count the total duplicates ?
It will help me to find only duplicates in 0 and 1. I need to rank it finally which as score more duplicates.
Is there any way we can do it in VB?
Helps are really appreciate
Pls refer attach if can help.