+ Reply to Thread
Results 1 to 7 of 7

Count text across many sheets (Not VBA)

  1. #1
    Registered User
    Join Date
    05-17-2013
    Location
    Glasgow, Scotland
    MS-Off Ver
    MS Office Standard 2013
    Posts
    27

    Count text across many sheets (Not VBA)

    Hello all,

    I have 132 worksheets and 1 summary sheet - all have identical column structure.

    Column 'I' in each of 132 worksheets may contain a text entry "Query" (without quotes).

    I want to use a formula in a cell of the summary sheet column 'I' to count the number of times "Query" appears across all sheets in same cell of their column 'I'!

    A summing formula I use successfully is - SUM(MySheet1:MySheet132!M8) - where the summary sheet contains the formula in its cell M8. (obviously all columns M contain numbers!).

    Unfortunately trying to imitate the SUM with something like COUNTIF((MySheet1!) : (MySheet3!),"Query") comes up with #NAME! error.

    I've tried a number of permutations of this with no success, can anyone help please?

    I would prefer not to use VBA.

    Thanks.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Count text across many sheets (Not VBA)

    =countif(MySheet1:MySheet132!M8,"Query")
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    05-17-2013
    Location
    Glasgow, Scotland
    MS-Off Ver
    MS Office Standard 2013
    Posts
    27

    Re: Count text across many sheets (Not VBA)

    Thanks oeldere,

    I tried this but unfortunately this brings up #VALUE! error!

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Count text across many sheets (Not VBA)

    To achieve this, list all your worksheets name in the range Z1:Z132 (MySheet1,MySheet2,MySheet3.........MySheet132) on Summary Sheet. Then try this......

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Count text across many sheets (Not VBA)

    Please Login or Register  to view this content.
    I didn't test it before posting.

    Now I tested it, and unfortunaly i got an failure.

    I don't have an solution on this one.


    I would solve it differant.

    Add all data on 1 sheet (e.g. with an macro).

    After that use a pivot table to analyze the data.

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Count text across many sheets (Not VBA)

    Quote Originally Posted by Phil Payne View Post
    Thanks oeldere,

    I tried this but unfortunately this brings up #VALUE! error!
    As oeldere should know since COUNTIF is not capable of operating on 3D ranges as such.

    You would need to do it as follows:

    First enter all of your sheet names (precisely as they appear on the tabs) into a vertical range somewhere in your master sheet, e.g. E1:E132.

    A quick way to do this (assuming your sheet names follow the pattern "MySheet" followed by the integers from 1 to 132) would be to enter "MySheet" into F1, copy down to F132 and then enter this formula into E1:

    =F1&ROWS($1:1)

    and copy down to E132.

    Your formula would then be:

    =SUMPRODUCT(COUNTIF(INDIRECT("'"&E1:E132&"'!M8"),"Query"))

    If you don't like the idea of having your sheet names in the actual worksheet, there is an alternative in which we could store them directly into Name Manager. Let me know if that would be preferable to you.

    Regards
    Last edited by XOR LX; 09-07-2014 at 07:38 AM.
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  7. #7
    Registered User
    Join Date
    05-17-2013
    Location
    Glasgow, Scotland
    MS-Off Ver
    MS Office Standard 2013
    Posts
    27

    Re: Count text across many sheets (Not VBA)

    Thanks everyone.

    I have had to revert to another solution - use 'helper' columns.

    I've set up a column at the extreme right of every sheet (column AM) with the formula =IF(m8="Query",1,0) and in the summary sheet =SUM(MySheet1:MySheet132!AM8).

    A work around that makes my file even bigger/more complex - but it does work.

    XOR LX -I'll keep in mind your method.

    Thanks for taking the time to help.

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Count text across many sheets (Not VBA)

    Actually I think your simple solution is perfectly good, and I would doubt very much that it will add much in terms of cost in resource. Nor is it something I would call particularly "complex"!

    Regards

+ 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] Count Text across multiple sheets
    By normilet in forum Excel General
    Replies: 2
    Last Post: 07-22-2014, 11:00 AM
  2. [SOLVED] Text count in word to text count in excel.
    By frisbie17 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-27-2012, 04:54 PM
  3. [SOLVED] Create New WB with copy of Sheets 1 & 2 when sheets count reaches 100
    By Corey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2006, 11:55 PM
  4. Replies: 18
    Last Post: 09-06-2005, 07:05 AM
  5. Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 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