+ Reply to Thread
Results 1 to 6 of 6

Array formula entering

  1. #1
    Registered User
    Join Date
    06-27-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2008 MAC
    Posts
    27

    Array formula entering

    Whats the difference between:

    =PRODUCT(1-$A1:F1)

    and

    {=PRODUCT(1-$A1:F1)} (array entered)

    The results seem to differ, the above is interpreted as:

    (1-A1)*(1-B2)*...*(1-F1) for both cases?
    Last edited by themachine; 07-06-2010 at 08:55 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: Array formula entering

    The former's result will vary depending on where you enter it. The latter is correct.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Array formula entering

    first 1 only does value in a1
    array looks at all the values in a1:f1
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Array formula entering

    An array formula must be entered by pressing

    Ctrl-Shift-Enter

    at the same time. Depending on the formula you have in the cell, the array-entered version will differ if there is a range of cells to be evaluated in the formula. If you just enter the formula with the Enter key, only the first cell of any array in the formula will be interpreted.

    You may not see a difference, depending on what the formula does and how many cells it spans. For more info about array formulas and how they work, see

    http://www.xtremevbtalk.com/showthread.php?t=296012

    cheers

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: Array formula entering

    Strictly speaking:
    If you enter the first one in column A you get: =PRODUCT(1-$A1)
    in column B you get: =PRODUCT(1-$B1)
    etc. to column F. Anywhere else you get #VALUE!.

  6. #6
    Registered User
    Join Date
    06-27-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2008 MAC
    Posts
    27

    Re: Array formula entering

    ah, I see, I was under the impression that array formulas only matter if the returned entity is an array as opposed to a scalar

+ 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