+ Reply to Thread
Results 1 to 6 of 6

Duplicate Counting Nice Easy question!!!!!

  1. #1
    Registered User
    Join Date
    06-05-2014
    Posts
    11

    Duplicate Counting Nice Easy question!!!!!

    Hi Guys and Gals!!

    I have a list of products in an excel spreadsheet and I need to give duplicates titles a matching code which for ease I'm starting at 1.

    For example: Column A has the title and column B has the number I want to generate using some code. Counting upwards from 1.


    Manchester United FC Stripe Ring 1
    Manchester United FC Stripe Ring 1
    Manchester United FC Stripe Ring 1
    Manchester United FC Super Titanium Ring 2
    Manchester United FC Super Titanium Ring 2
    Manchester United FC Super Titanium Ring 2
    Manchester United FC Velcro Boot Crib 3
    Manchester United FC Velcro Boot Crib 3 etc. etc.

    There must be a very simple bit of code (that is beyond me!!) that will do column B for me as currently I'm doing manually and it taking me forever and therefore easier to make a mistake!!!! I assume I should uses an IF statement that tells the Cell in column B to add 1 to the value of the previous cell if it is not a duplicate and to remain the same if it is.

    Can you help please with writing of some simple code to do this!!

    Thank you

    Stephen
    Last edited by Stephen_Malley; 01-05-2015 at 10:04 AM.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Duplicate Counting Nice Easy question!!!!!

    Try this one

    =SUMPRODUCT(1/COUNTIF(A$1:A1,A$1:A1))

    Row\Col
    A
    B
    1
    Manchester United FC Stripe Ring
    1
    2
    Manchester United FC Stripe Ring
    1
    3
    Manchester United FC Stripe Ring
    1
    4
    Manchester United FC Super Titanium Ring
    2
    5
    Manchester United FC Super Titanium Ring
    2
    6
    Manchester United FC Super Titanium Ring
    2
    7
    Manchester United FC Velcro Boot Crib
    3
    8
    Manchester United FC Velcro Boot Crib
    3
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Duplicate Counting Nice Easy question!!!!!

    Hi,

    It's not clear what's in column A and what's in Column B but you could try in B1 copied down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    which assumes MANCHESTER UNITED FC is in A1 and Stripe ring,..etc in B1
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Duplicate Counting Nice Easy question!!!!!

    Assuming the data is sorted, so that each product is all listed together..
    And If the data starts in A2 (row 1 is headers)
    And you manually enter the very first number in B2
    In B3 put
    =IF(A3=A2,B2,B2+1)

  5. #5
    Registered User
    Join Date
    06-05-2014
    Posts
    11

    Re: Duplicate Counting Nice Easy question!!!!!

    Thank you all for your quick replys. Love this forum. It has saved me many an hour!!!!

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Duplicate Counting Nice Easy question!!!!!

    You're welcome and thank you for the feedback!

    Please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools -> Mark thread as Solved).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 03-13-2014, 07:03 AM
  2. [SOLVED] Nice easy one for you all.
    By MacGT4 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-13-2013, 07:27 AM
  3. Counting Dates-Is there a nice easy formula to do this?
    By Hodged in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-17-2007, 08:25 AM
  4. Nice easy one...
    By ExcelRoy in forum Excel General
    Replies: 1
    Last Post: 10-07-2006, 06:01 AM
  5. Nice easy Listbox queries
    By Peter Rooney in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-10-2006, 06:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1