+ Reply to Thread
Results 1 to 2 of 2

Array formula help

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    13

    Array formula help

    Hi guys,

    I have created the following formula:

    Please Login or Register  to view this content.
    It works exactly as it should.

    However, this is being used across a number of fields referencing different columns.
    Is there a way I can change the lookup array to reference a range or a sequence of cells instead of hard coding the values?

    So, in essence, this:
    Please Login or Register  to view this content.
    I'm not sure if this is possible - I haven't found any examples that use anything other than hardcoding.

    Any help would be very much appreciated

  2. #2
    Valued Forum Contributor
    Join Date
    10-15-2007
    Location
    Home
    MS-Off Ver
    Office 2010, W10
    Posts
    373

    Re: Array formula help

    Hi

    2 problems with your formula

    1 -
    {C70:C80}

    This is invalid syntax, an array can only have elements that are constants

    2 -

    If you want to use a range to write the lookup values, like in the case you post, the vector with the data values and the vector with the lookup values must be orthogonal.

    Since your vector with the data values ($B$10:$B$150000) is vertical this means that you have 2 options


    Option 1

    You use a horizontal vector to write the lookup values, for ex. E70:O70. In that case it's direct:

    =ROUND(AVERAGE(IF(('2013 valuations'!$B$10:$B$150000=E70:O70)*('2013 valuations'!$D$10:$D$150000=F$2),'2013 valuations'!$O$10:$O$150000)),0)


    Option 2

    If you want to use a vertical vector to write the lookup values you have to transpose it. For ex., in your formula you wanted to use C70:C80, you have to use:

    =ROUND(AVERAGE(IF(('2013 valuations'!$B$10:$B$150000=TRANSPOSE(C70:C80))*('2013 valuations'!$D$10:$D$150000=F$2),'2013 valuations'!$O$10:$O$150000)),0)


    ... both are array formulas, like yours.

+ 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. Can I make the row lookup array/range part in an array formula variable?
    By OLLY-7 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-18-2014, 09:06 AM
  2. Array formula + Array formula with criteria that lookups a Table
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2013, 11:41 AM
  3. Replace hard coded array in formula with link to input array
    By David Brown in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-08-2011, 07:45 AM
  4. Converting 3x10 array to a 1X30 array to run a Match formula
    By NBVC in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-08-2009, 07:45 AM
  5. [SOLVED] Tricky array formula issue - Using array formula on one cell, then autofilling down a range
    By aspenbordr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2005, 11:05 AM

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