+ Reply to Thread
Results 1 to 6 of 6

Dynamic Range

  1. #1
    Registered User
    Join Date
    08-31-2018
    Location
    canada
    MS-Off Ver
    2016
    Posts
    2

    Dynamic Range

    Thank you in advance for your help.

    I am trying to write a formula that returns a counter but the range where it is counting is dynamic.

    For a static range, I use the formula =CountIf(A:A,100) which returns all "100" in column A.

    For the range, I want to reference two cells which value can change.

    So instead of the range being the whole A column, it will only be a part of the A column.

    I tried the following but without success: =COUNTIF(K(G55):K(G54),100)

    where G55 = 10, G54 = 15

    which would make the formula: =countif(K10:k15,100)

    Any help is appreciated.

    Simon

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Dynamic Range

    Try...
    =COUNTIF(INDIRECT("K" & G55 & ":K" & G54),100)

    Alternately...
    =COUNTIF(INDEX(K:K,G55):INDEX(K:K,G54),100)
    "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
    ― Robert A. Heinlein

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,691

    Re: Dynamic Range

    I think this is what you want...
    =COUNTIF((INDIRECT("k"&G55):INDIRECT("k"&G54)),100)
    Indirect is what will point what is in K and G55 to end up being the location of K10
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Dynamic Range

    =countif(index(a:a,g55):index(a:a,g54),100)

  5. #5
    Registered User
    Join Date
    08-31-2018
    Location
    canada
    MS-Off Ver
    2016
    Posts
    2

    Re: Dynamic Range

    Thank you all for the very fast replies, I tried Sambo Kid and it worked like a charm.

    Thank you!!

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,691

    Re: Dynamic Range

    You're welcome, and CK76's also work. Haven't tried Tim's. Since you are new to the forum you can also thank those who stopped by to help by clicking on *Add Reputation below their posts as another way to say thanks too. It is how we advance on this forum.

+ 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] Populate Dynamic Array from Cell Values and write to Dynamic Range
    By TFiske in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2018, 09:09 AM
  2. [SOLVED] Dynamic Range/Dynamic Chart Using Cell Value for Reference and without CountA
    By kelseygueldalewis in forum Excel General
    Replies: 11
    Last Post: 09-11-2017, 04:52 PM
  3. Match ComboBox with dynamic range, then add Textbox1 to dynamic range
    By Lasse Moe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2014, 01:26 AM
  4. Dynamic Range Column Chart w/ Dynamic Avg Line (Excel 2007)
    By BrokenBiker in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-04-2012, 11:40 AM
  5. Fill Dynamic Range From Dynamic Source Range
    By goss in forum Excel General
    Replies: 2
    Last Post: 03-06-2012, 12:05 PM
  6. [SOLVED] Dynamic Range with unused formula messing up x axis on dynamic graph
    By cabybake@yahoo.com in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-02-2006, 04:10 PM
  7. select dynamic range with dynamic start point
    By Juli in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2005, 08: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