+ Reply to Thread
Results 1 to 4 of 4

a 'somewhat complex ' countif statement

  1. #1
    Registered User
    Join Date
    06-25-2020
    Location
    London
    MS-Off Ver
    10
    Posts
    1

    a 'somewhat complex ' countif statement

    Hi, I want a way to do some analysis of a large data set , best way to explain is to show a little of the extract:

    25.4 RPT_APPLICATION_D
    25.4 RPT_APPLICATION_D
    25.4 RPT_APPLICATION_D
    25.5 RPT_ASSIGNED_AGENTS_D
    25.5 RPT_ASSIGNED_AGENTS_D
    25.6 RPT_CASH_ACCOUNT_D
    25.6 RPT_CASH_ACCOUNT_D
    25.6 RPT_CASH_ACCOUNT_D

    Basically I want to be able to count the no of times in this example that 'RPT' appears in column B but ONLY when column A's Index no is unique i.e. I want the formula to return '3' rather than '8'

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    Re: a 'somewhat complex ' countif statement

    A quick way may be to have the data sorted, then use SUBTOTAL (on Data menu) - here's where you can use COUNT to count for you. It will insert a subtotal line with what you pick (sum, Count etc). Without SEEING your actual data, it is difficult to see what's in Column A and B. Peruse Subtotal on Excel and you should get what is desired.

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

    Re: a 'somewhat complex ' countif statement

    a few options to return the conditional unique count, on XL2010 one would be:

    =SUM(SIGN(FREQUENCY(IF(LEFT($B$1:$B$8,3)="RPT",MATCH($A$1:$A$8,$A$1:$A$8,0)),ROW($A$1:$A$8)-ROW($A$1)+1)))
    confirmed with CTRL + SHIFT + ENTER

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: a 'somewhat complex ' countif statement

    crosspost: https://www.mrexcel.com/board/thread...ement.1138219/

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Not sure if this is a complex Countif
    By D2S in forum Excel General
    Replies: 1
    Last Post: 06-28-2019, 05:18 PM
  2. [SOLVED] More complex COUNTIF statement than i'm used to proving problematic
    By Balrogsdead in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-01-2014, 09:46 PM
  3. Complex countif
    By brad.tho in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 04-04-2008, 07:14 AM
  4. countif complex
    By khalid79m in forum Excel General
    Replies: 1
    Last Post: 12-29-2006, 06:30 AM
  5. Complex or Conditional Countif(s)
    By Booweezie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-07-2006, 03:40 PM
  6. help please - complex countif, etc. functions
    By bj in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  7. [SOLVED] help please - complex countif, etc. functions
    By Jennie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 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