+ Reply to Thread
Results 1 to 4 of 4

How do I reference an entire column in an array formula?

  1. #1
    Registered User
    Join Date
    04-08-2004
    Posts
    39

    How do I reference an entire column in an array formula?

    Hi,

    I know that in SUBTOTAL formulas in some other formulas you can reference an entire column in another worksheet as follows:

    worksheet1B:B

    However, this does not seem to work in array formulas (the ones where you use CTRL+SHFT+ENTER). I have an =AVERAGE(IF... formula and I have to reference like rows 2 to 5000.

    Is there a way to reference an entire column in array formulas? Thanks.

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Assuming that Column B contains your numerical values to average, you can use a 'near' whole column reference...

    =AVERAGE(IF(A2:A65536=Criteria,B2:B65536))

    Or you can define dynamic ranges...

    Insert > Name > Define

    Name: ColumnA
    Refers to:
    =Sheet1!$A$1:INDEX(Sheet1!$A:$A,MATCH(9.99999999999999E+307,Sheet1!$B:$B))

    Click Add

    Name: ColumnB
    Refers to:
    =Sheet1!$B$1:INDEX(Sheet1!$B:$B,MATCH(9.99999999999999E+307,Sheet1!$B:$B))

    ...and then use the following formula...

    =AVERAGE(IF(RangeA=Criteria,RangeB))

    Now the range will automatically adjust as you enter new data or delete old ones.

    Hope this helps!
    Last edited by Domenic; 04-19-2005 at 04:21 PM.

  3. #3
    Registered User
    Join Date
    04-08-2004
    Posts
    39
    Domenic,

    Thank you again for sharing your expertise. Two questions about the solutions you suggested.

    First, does it change the processing time to tell it 2 to 65k as opposed to any of the other methods you suggest, or since it means the same thing, it makes no difference when formulas are being calculated?

    Second, when you define a dynamic range, can i reference a column in a worksheet and use that in all the worksheets in the workbook?

    Thanks again.

  4. #4
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Quote Originally Posted by fbarbie
    First, does it change the processing time to tell it 2 to 65k as opposed to any of the other methods you suggest, or since it means the same thing, it makes no difference when formulas are being calculated?
    Yes, I believe using dynamic ranges is faster, but I don't know how much faster nor can I point you to any data that would support it. Nevertheless, try it, you'll likely notice the difference.

    Second, when you define a dynamic range, can i reference a column in a worksheet and use that in all the worksheets in the workbook?
    Yes you can.

+ 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