ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Assign a Value to a Duplicate Entry Within the Same Column (https://www.excelbanter.com/excel-discussion-misc-queries/51698-assign-value-duplicate-entry-within-same-column.html)

Scott C.

Assign a Value to a Duplicate Entry Within the Same Column
 
Within a single worksheet I have thousand-plus rows of data and one of the
columns within that worksheet I have a series of numbers. After I've
identified the duplicates within that column I want to assign a value based
on the first time that number shows up (in this case by I'v sorted by date),
so the first duplicate would have a value like "1." I then want to assign
the next duplicate(s) sequentially (2, 3, 4, etc.) When finished I would
want a new column of data that would have far more "1s" than "2s," more "2s"
than "3s," etc.

How do I accomplish this?

B. R.Ramachandran

Assign a Value to a Duplicate Entry Within the Same Column
 
Hi,

Supposing Column D has those numbers (say, D2:D2001, type in the following
formula in E2

=COUNTIF($D$2:$D$2001,D2)-COUNTIF(D2:$D$2001,D2)+1

and fill-in the formula down the column.

Regards,
B. R. Ramachandran


"Scott C." wrote:

Within a single worksheet I have thousand-plus rows of data and one of the
columns within that worksheet I have a series of numbers. After I've
identified the duplicates within that column I want to assign a value based
on the first time that number shows up (in this case by I'v sorted by date),
so the first duplicate would have a value like "1." I then want to assign
the next duplicate(s) sequentially (2, 3, 4, etc.) When finished I would
want a new column of data that would have far more "1s" than "2s," more "2s"
than "3s," etc.

How do I accomplish this?


B. R.Ramachandran

Assign a Value to a Duplicate Entry Within the Same Column
 
Hi,

Here is a simpler formula than the one I suggested in my previous reply (I
am embarrassed about the earlier round-about formula!)

=COUNTIF($D$2:D2,D2)

Regards,
B. R. Ramachandran

"Scott C." wrote:

Within a single worksheet I have thousand-plus rows of data and one of the
columns within that worksheet I have a series of numbers. After I've
identified the duplicates within that column I want to assign a value based
on the first time that number shows up (in this case by I'v sorted by date),
so the first duplicate would have a value like "1." I then want to assign
the next duplicate(s) sequentially (2, 3, 4, etc.) When finished I would
want a new column of data that would have far more "1s" than "2s," more "2s"
than "3s," etc.

How do I accomplish this?


Scott C.

Assign a Value to a Duplicate Entry Within the Same Column
 
Worked liked a charm! Thanks B. R.Ramachandran!

"B. R.Ramachandran" wrote:

Hi,

Here is a simpler formula than the one I suggested in my previous reply (I
am embarrassed about the earlier round-about formula!)

=COUNTIF($D$2:D2,D2)

Regards,
B. R. Ramachandran

"Scott C." wrote:

Within a single worksheet I have thousand-plus rows of data and one of the
columns within that worksheet I have a series of numbers. After I've
identified the duplicates within that column I want to assign a value based
on the first time that number shows up (in this case by I'v sorted by date),
so the first duplicate would have a value like "1." I then want to assign
the next duplicate(s) sequentially (2, 3, 4, etc.) When finished I would
want a new column of data that would have far more "1s" than "2s," more "2s"
than "3s," etc.

How do I accomplish this?



All times are GMT +1. The time now is 06:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com