+ Reply to Thread
Results 1 to 4 of 4

Subtotal

  1. #1
    Registered User
    Join Date
    01-10-2019
    Location
    UK
    MS-Off Ver
    2010
    Posts
    17

    Subtotal

    Morning,

    I am using Subtotal within my Excel spreadsheet to count data in a filtered spreadsheet.

    I am using the below formula to capture specific words when my sheet is filtered and this works fine.

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(O1,ROW(O12:O103)-ROW(O1),0)),(O12:O103="North")+0)

    However, I want another formula to work for when filtering data to cell containing any text and not a specific word like North. I thought I could just pit "*" but this doesn't seem to work, can anyone help?

    Regards,

    Chris

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Subtotal

    when you say any text are you explicitly excluding other data types - like numerics, booleans etc?

    If not - you can use a LEN test - i.e. replace (O12:O103="North")+0 with SIGN(LEN(O12:O103))
    If yes - i.e. text only - then you could replace (O12:O103="North")+0 with ISTEXT(O12:O103)*SIGN(LEN(O12:O103))

  3. #3
    Registered User
    Join Date
    01-10-2019
    Location
    UK
    MS-Off Ver
    2010
    Posts
    17

    Re: Subtotal

    Sorry I don't think I made myself clear.

    The formula I posted basically looks for the word "North" in a column. However, I want to run the formula on another column which will look for any cell containing text (doesn't matter on what text).

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Subtotal

    yes, I was able to deduce what your current formula does, the suggestions in my prior post remain valid - simply change the range reference from O to suit, e.g.:

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


    the above would count number of (filtered) cells in Col P which contained text strings >= 1 char

+ 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. Sorting by Alpha, Adding Subtotal - then removing subtotal - variable data sets
    By gregg_grug in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-03-2019, 07:41 PM
  2. VBA to subtotal by test and highlight the subtotal row with light gray
    By LALTIZER in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-23-2017, 05:28 AM
  3. Im New...if subtotal exists then remove. if subtotal doesnt exist do nothing
    By ci89 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2015, 04:53 PM
  4. Replies: 1
    Last Post: 09-18-2013, 04:10 PM
  5. Replies: 8
    Last Post: 07-31-2012, 09:41 AM
  6. Subtotal - Delete zero Subtotal and prior rows that calculate to that zero Subtotal
    By Whatsherface in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2012, 08:37 PM
  7. Replies: 3
    Last Post: 03-08-2006, 05:25 PM

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