+ Reply to Thread
Results 1 to 5 of 5

Array formula help, counting size of a dataset!

  1. #1
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Array formula help, counting size of a dataset!

    Hello, i am relatively new to the use of array formulae, but am starting to become aware of their huge power and abilities over regular formulae.

    I produce and recieve spreadsheets which can have hundereds of datasets in ranging from 1- 30 pieces of data, Each dataset is seperated spatialy, and as such i beilieve an array formula could be used to return the size of the datasets. I need an array formulae which can essentially count the number of cells in each dataset, and return the value where the rank = 1.

    Please see example.

    Many thanks for any contributions.

    Ad
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Array formula help, counting size of a dataset!

    Try, in F5:

    =IF(D5=1,COUNT(D5:INDEX(D5:D$10000,MATCH(TRUE,INDEX(D5:D$10000="",0),0))),"") copied down

    where D10000 is the last row that data may be contained in...

    Note this is an array formula, although you do not need the CTRL+SHIFT+ENTER confirmation, so try not to go too large on the ranges used.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Array formula help, counting size of a dataset!

    A little more efficient way, would be to add a helper say in E5 with formula:

    =IF(AND(D4<>"",D5=""),1,"")

    copied down as far as needed,

    Then in F5:

    =IF(D5=1,COUNT(D5:INDEX(D5:D$10000,MATCH(1,E5:E$10000,0))),"")


    copied down as far as needed, again adjusting the 10000 upper bound as required.

  4. #4
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Array formula help, counting size of a dataset!

    Hmmm well the first version worked fine, what makes the second method more efficient?

    Many thanks for the help btw!

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Array formula help, counting size of a dataset!

    It's not an array formula.. so you should be able to expand the range larger and have more formulas without as much compromise to the processor.

+ 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