+ Reply to Thread
Results 1 to 7 of 7

is it possible to COUNT between two named ranges?

  1. #1
    Forum Contributor
    Join Date
    09-12-2013
    Location
    chicago, illinois
    MS-Off Ver
    Excel 2010
    Posts
    109

    is it possible to COUNT between two named ranges?

    good day all...i have been toying with a formula for a bit and have not gotten anywhere. i have a named range, a placeholder really, in cell A2. now, in cell A5, there is another named range. i need a formula that will COUNTA between those two ranges, not including the ranges themselves. the kicker here is, that data is inserted after the last row via vba so the 2nd named range in A5...will change, to A6 or to A7, etc. however the named range doesn't change. that is why i need this formula.

    i have tried =counta(test1:test2) but of course that would have been too easy

    thank you for any help!

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: is it possible to COUNT between two named ranges?

    Hi,

    Can I ask what the two Named Ranges are?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor
    Join Date
    09-12-2013
    Location
    chicago, illinois
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: is it possible to COUNT between two named ranges?

    right now i have this:

    =COUNTA(incoming(offset2),outgoing(offset-1))

    i tried the offsets, because under the incoming range name placeholder i have the count formula that should display the number counted. so in A2 i have INCOMING, then in A3 i have the formula, then A4:A22 i have data, but more rows will be added. A25 is OUTGOING range name placeholder, but again, that will be pushed down as more incoming rows are added. the OUTGOING count is easy because it just goes to the end of the sheet

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: is it possible to COUNT between two named ranges?

    Sorry - not sure I understand. That doesn't look like standard OFFSET syntax.

    And are incoming and outgoing your defined ranges? To what precisely do they refer?

    Even better, are you able to mock up a small workbook illustrating precisely what it is you are trying to achieve? It doesn't have to be your actual dataset, nor particularly large - just sufficient to illustrate your query.

    Regards

  5. #5
    Forum Contributor
    Join Date
    09-12-2013
    Location
    chicago, illinois
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: is it possible to COUNT between two named ranges?

    yeah i probably screwed up the offset syntax. incoming and outgoing are my defined ranges. they are just a single cell. incoming is in cell A2 and the data starts in cell A4. rows will be added before the outgoing cell. my problem is that when i run a COUNTA, it does not continue as i add rows. say, if i have data in A4:A23 and COUNTA those rows, if i add a row somewhere there with data in it, it STILL only counta from A4:A23. when i add a row, the cell with "outgoing" value moves down, the named range moves with it. so if i can run a COUNTA between two named ranges it should automatically update. this is confusing, i know. i tried to make up a test sheet and attach it. i'm not sure if its even possible. i might just have to use some VBA code to add it in a different way.

  6. #6
    Forum Contributor
    Join Date
    09-12-2013
    Location
    chicago, illinois
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: is it possible to COUNT between two named ranges?

    yeah i probably screwed up the offset syntax. incoming and outgoing are my defined ranges. they are just a single cell. incoming is in cell A2 and the data starts in cell A4. rows will be added before the outgoing cell. my problem is that when i run a COUNTA, it does not continue as i add rows. say, if i have data in A4:A23 and COUNTA those rows, if i add a row somewhere there with data in it, it STILL only counta from A4:A23. when i add a row, the cell with "outgoing" value moves down, the named range moves with it. so if i can run a COUNTA between two named ranges it should automatically update. this is confusing, i know. i tried to make up a test sheet and attach it. i'm not sure if its even possible. i might just have to use some VBA code to add it in a different way.

  7. #7
    Forum Contributor
    Join Date
    09-12-2013
    Location
    chicago, illinois
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: is it possible to COUNT between two named ranges?

    no worries! i got it...used some good ole code for some automation and it works well!

    Please Login or Register  to view this content.

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: is it possible to COUNT between two named ranges?

    So is outgoing supposed to always correspond to the last non-blank cell in that column?

    Regards

+ 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. Count Named ranges VBA code
    By tarunpreet in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-09-2019, 04:32 AM
  2. [SOLVED] Determining if the value of a cell can be a named range, then assigning named ranges after
    By Romulo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-15-2013, 06:05 PM
  3. Creating a dynamic set of Named ranges, based on the row count.
    By sdingman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-23-2013, 11:32 AM
  4. Replies: 1
    Last Post: 10-07-2012, 09:56 PM
  5. Replies: 1
    Last Post: 03-21-2006, 06:40 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