+ Reply to Thread
Results 1 to 10 of 10

How to reference values in a column whose values change dynamically

Hybrid View

welchs101 How to reference values in a... 11-21-2011, 11:22 AM
Whizbang Re: How to reference values... 11-21-2011, 12:00 PM
welchs101 Re: How to reference values... 11-21-2011, 01:52 PM
Whizbang Re: How to reference values... 11-21-2011, 02:09 PM
welchs101 Re: How to reference values... 11-21-2011, 02:18 PM
welchs101 Re: How to reference values... 11-21-2011, 02:24 PM
welchs101 Re: How to reference values... 11-21-2011, 02:53 PM
Whizbang Re: How to reference values... 11-21-2011, 02:34 PM
Whizbang Re: How to reference values... 11-21-2011, 03:11 PM
welchs101 Re: How to reference values... 11-21-2011, 05:11 PM
  1. #1
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: How to reference values in a column whose values change dynamically

    Dynamic Named Ranges will still calculate for every cell that uses the Name. So, there isn't any gain in performace for using Named Ranges.

    For example:
    Named Range ColA =A2:INDEX(A:A, COUNTA(A:A))
    Cell B1 =COUNTIFS(ColA, ">" & 0)
    Cell B2 =COUNTIFS(ColA, "<=" & 0)

    Will calculate the same as
    Cell B1 =COUNTIFS(A2:INDEX(A:A, COUNTA(A:A)), ">" & 0)
    Cell B2 =COUNTIFS(A2:INDEX(A:A, COUNTA(A:A)), "<=" & 0)


    BUT, named ranges allow for "self documenting". Pretend you put aside this workbook for a year and come back to it. You read the formula:
    =COUNTIFS(A2:INDEX(A:A, COUNTA(A:A)), ">" & 0)

    What does that mean? Obviously we are counting the occurances in column A that are greater than 0, but why? What is in column A? Why do we care if they are greater than 0? It is simple enough, in this case, to just look at column A, and maybe the entire table, to determine the purpose of the formula. But wouldn't it be better if the formula read this?
    =COUNTIFS(CustomerFeesDue, ">" & 0)

    We see right away that we are counting the number of customers who owe fees, without having to refer to the table at all. Naming ranges or formulas are a great way to make your workbook more readable.

    Another significant gain is that you can change the formula once, rather than throughout the workbook.

    Pretend that we filled a workbook with formulas that use the dynamic range method described. But then you shuffle things around and you need to change the formula to reflect the changes. You could go through and update each and every formula, or you could just use a named range/formula and update only the Name.

    Really, as far as I know, you don't gain anything performance-wise by naming your ranges/formulas, but you do gain readability and maintainability.

  2. #2
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: How to reference values in a column whose values change dynamically

    very good explanation! Very good! Made a lot of sense. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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