+ Reply to Thread
Results 1 to 5 of 5

Countif dynamic range

  1. #1
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Countif dynamic range

    Hi,

    I would like a formula which counts the number of rows away from a dynamic cell.

    In my data set I have 3 customers “customer 1, Customer 2 and Customer 3”.

    I would like to count the number of “F”’s for each particular customer. The number of customers can vary.

    I have uploaded sample data with expected outputs.

    Can anyone help please?
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Countif dynamic range

    Try this array formula in E6 then drag down:

    =IF(D6="F",ROW()-MAX(IF($D$5:D6<>"F",ROW($D$5:D6))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Quang PT

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Countif dynamic range

    Here is a possible solution for you. Enter in E6 and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Countif dynamic range

    Thank you both! Each formula worked

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Countif dynamic range

    Thank you for the feedback and the rep.

+ 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] Countif Dynamic Range
    By ajw089 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-04-2016, 05:25 PM
  2. [SOLVED] Help with offest and countif (Dynamic range)
    By LEEDA12345 in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 02-21-2014, 10:13 AM
  3. Using COUNTIF with a dynamic range
    By ruthjames in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-25-2013, 11:20 AM
  4. COUNTIF: dynamic range
    By BATISTAJM in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-22-2013, 07:17 PM
  5. Offset and Countif with dynamic Range
    By JKK123 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2013, 12:15 AM
  6. Dynamic Range using Offset and CountIF
    By mark_jam3s in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-04-2008, 11:43 AM
  7. Offset, Dynamic range, Countif
    By Bryce in forum Excel General
    Replies: 3
    Last Post: 10-26-2005, 08:05 AM

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