+ Reply to Thread
Results 1 to 8 of 8

Count the number of times a value appears across multiple sheets displaying a total

  1. #1
    Registered User
    Join Date
    01-22-2014
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Cool Count the number of times a value appears across multiple sheets displaying a total

    Hi My Name is Phil,
    I have always found forums helpful place to find solutions for my excel questions, in particular this one.
    I look forward to contributing to the community where possible.
    My Problem is I have a workbook with multiple sheets with a possibility of a number between 2 and 999 occurring. I am looking for a formula that can display a table on the "total" worksheet for every ID number that has been entered and the number of times the ID number is displayed.

    Thank you for your time in this matter.

    Regards Phil

  2. #2
    Registered User
    Join Date
    02-15-2012
    Location
    London, United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Count the number of times a value appears across multiple sheets displaying a total

    Hi Philbe,

    Can you please upload a example of your worksheet for us to look at.

    Regards,

    Caf20012

  3. #3
    Registered User
    Join Date
    01-22-2014
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Count the number of times a value appears across multiple sheets displaying a total

    Hi,
    Sorry for the delay in my reply
    I have uploaded a sample of the workbook.
    I have tried using a pivot table but can not get it to work properly.
    On the total page I want to be able to count which ID numbers appear and the frequency of each ID number.
    Typically this workbook will have a "sheet" for each day of the month

    Thank you
    Attached Files Attached Files

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count the number of times a value appears across multiple sheets displaying a total

    Are you willing to change the sheet names to just the day of the month numbers without the ordinal suffix?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    01-22-2014
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Count the number of times a value appears across multiple sheets displaying a total

    Yes I could do that if it would be easier

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count the number of times a value appears across multiple sheets displaying a total

    OK, try this...

    Create this named formula.
    Goto the Formulas tab>Define name
    Name: SheetNames
    Refers to: =TRANSPOSE(ROW(INDIRECT("1:31")))
    OK out

    This will create a horizontal array of the numbers 1 to 31 representing the sheet names.

    In your sample file which I will attach to the post, this named formula is:

    =TRANSPOSE(ROW(INDIRECT("2:5")))

    Because in the sample file the sheet names of interest are 2, 3, 4 and 5.

    On the Total sheet...

    Enter this formula in A2:

    =MIN('1:31'!C2:C8)

    Enter this array formula** in A3. This will list the distinct ID numbers in ascending order.

    =IFERROR(1/(1/MIN(IF(N(OFFSET(INDIRECT("'"&SheetNames&"'!C2:C8"),ROW(C$2:C$8)-ROW(C$2),))>A2,N(OFFSET(INDIRECT("'"&SheetNames&"'!C2:C8"),ROW(C$2:C$8)-ROW(C$2),))))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Enter this formula in B2 and copy down to B3. This will return the counts of the ID numbers.

    =IF(A2="","",SUMPRODUCT(COUNTIF(INDIRECT("'"&SheetNames&"'!C2:C8"),A2)))

    Select A3:B3 and copy down until you get blanks.

    Here's your file with this implemented:

    Philbe.xlsx
    Last edited by Tony Valko; 01-30-2014 at 04:21 PM.

  7. #7
    Registered User
    Join Date
    01-22-2014
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Count the number of times a value appears across multiple sheets displaying a total

    Thank you Tony Valko,
    That is fantastic,
    I really appreciate your help

    Regards Phil

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count the number of times a value appears across multiple sheets displaying a total

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this 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. Adding number of times word appears in date range across multiple sheets
    By ashbeeigh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-17-2013, 01:49 PM
  2. [SOLVED] Count the number of times an A appears 5 or more times consecutively
    By CCook310 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-02-2013, 04:02 PM
  3. Replies: 3
    Last Post: 09-17-2012, 08:05 AM
  4. Replies: 2
    Last Post: 12-09-2009, 06:36 AM
  5. I want a box with the total number of times ORDER appears!
    By tapley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-23-2006, 09:20 AM

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