+ Reply to Thread
Results 1 to 9 of 9

How do I combine these two functions?

  1. #1
    Registered User
    Join Date
    03-05-2014
    Location
    New York, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    How do I combine these two functions?

    What I am trying to accomplish is having one collection of summary data at the top of the more detailed information. I would like the summary data to change depending on the filter applied. I can get the data to change with the applied filter with the SUBTOTAL function and can get the data to be summarized counting the way I want. ( I need to count the different numbers that occur without counting duplicates) The problem I am facing is with embedding the SUM/IF/FREQ function bulleted below within a Subtotal function.

    • =(SUM(IF(FREQUENCY(F40:F60,F40:F60)>0,1)))
    o counts the different numbers that occur without duplicates
    • =SUBTOTAL(3,F24:F60)
    o I am using to count only what is filtered

    I relize I can not embed the count function I need instead of the prexisting 1-9 options given for SUBTOTAL but is there another alternative to achieving the same effect?

    Here is an example of my data: example of CR.png

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: How do I combine these two functions?

    Try Below
    =(SUM(--(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(F40:F60,ROW(F40:F60)-MIN(ROW(F40:F60))+1,,1)),F40:F60),IF(SUBTOTAL(3,OFFSET(F40:F60,ROW(F40:F60)-MIN(ROW(F40:F60))+1,,1)),F40:F60))>0,1))))
    Array (Control Shift and Enter) entered not simple enter
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Registered User
    Join Date
    03-05-2014
    Location
    New York, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How do I combine these two functions?

    Thank you Hemesh!

    This is really close I think. Some of the counts are correct but on others they are off by one (both 1 short or 1 too many)

  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: How do I combine these two functions?

    In other words...

    You want to count the unique numbers in the filtered (or unfiltered) range F40:F60?

    If that's what you want to do try this array formula**:

    =SUM(IF(FREQUENCY(IF(SUBTOTAL(2,OFFSET(F40,ROW(F40:F60)-ROW(F40),0)),F40:F60),F40:F60),1))

    ** 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.
    Last edited by Tony Valko; 03-05-2014 at 03:46 PM. Reason: changed some wording
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    03-05-2014
    Location
    New York, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How do I combine these two functions?

    YES! Perfect! THANK YOU!!!

  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: How do I combine these two functions?

    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.

  7. #7
    Registered User
    Join Date
    03-05-2014
    Location
    New York, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How do I combine these two functions?

    Is it possible to have this equation also count text?

  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: How do I combine these two functions?

    Try this...

    Array entered**:

    =SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(A5,ROW(A5:A10)-ROW(A5),0)),MATCH(A5:A10,A5:A10,0)),ROW(A5:A10)-ROW(A5)+1)>0,1))

    ** 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.

    That will count the unique entries, text or numbers, in the filtered (or unfiltered) range A5:A10.
    Last edited by Tony Valko; 04-04-2014 at 08:49 PM.

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

    Re: How do I combine these two functions?

    If you need it to count TEXT ONLY...

    Array entered**:

    =SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(A5,ROW(A5:A10)-ROW(A5),0)),MATCH(A5:A10,A5:A10,0)),ROW(A5:A10)-ROW(A5)+1)>0,IF(ISTEXT(A5:A10),1)))

    ** 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.

+ 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] Possible to Combine These Functions?
    By jo15765 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2012, 08:38 AM
  2. Combine 2 functions into 1
    By Charon_ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-28-2009, 12:35 PM
  3. combine functions
    By XLS-EXCEL in forum Excel General
    Replies: 2
    Last Post: 09-13-2007, 11:00 AM
  4. Combine functions?
    By ~suky~ in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-23-2006, 11:51 AM
  5. How DO I combine these 2 functions?
    By dominos3814 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2005, 06:52 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