+ Reply to Thread
Results 1 to 7 of 7

Counting repetition of item number

  1. #1
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Counting repetition of item number

    Hi all,

    I am trying to count the number of occurrences of items. Unfortunately, because of the way the data is set up, the item number does not actually repeat, instead there's a blank row below, instead of the duplicate. How can I nevertheless count the repetition of such item? See sample file for clarification.
    Attached Files Attached Files

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Counting repetition of item number

    Maybe I misunderstand something...I don't see any duplicates in the list you provided.

    OK, I get it now. The blank lines are the repeat.

  3. #3
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: Counting repetition of item number

    Sorry, perhaps I wasn't clear enough. Every blank below an item serves as a 'duplicate'. This is just how it was initially set up in a pivot.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Counting repetition of item number

    Perhaps this
    =IF(H3="","",MAX(1,INDEX(ROW($H4:$H$45),MATCH("*",$H4:$H$45,0))-ROW()))
    copied down
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Counting repetition of item number

    Or try in G3:

    =IF(H3="","",MATCH("*",$H4:$H$45,0))

  6. #6
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: Counting repetition of item number

    Perfect! Both solutions work! Thanks!!

  7. #7
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Counting repetition of item number

    If the data was already in a pivot table then the count can be obtained directly from the pivot.

+ 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. [SOLVED] VB Code to count the number of repetition of Cell Value
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-12-2016, 04:43 AM
  2. Using If statement to link item number and item from two different sheets
    By jaylahaye1974 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-14-2015, 09:43 AM
  3. Replies: 2
    Last Post: 10-14-2014, 07:12 AM
  4. Replies: 1
    Last Post: 08-22-2014, 12:27 AM
  5. Searching Item Code And Item Number
    By Shi in forum Excel General
    Replies: 3
    Last Post: 11-23-2013, 03:33 AM
  6. Replies: 1
    Last Post: 11-01-2012, 08:37 AM
  7. Replies: 5
    Last Post: 05-17-2012, 10:51 PM

Tags for this Thread

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