+ Reply to Thread
Results 1 to 4 of 4

Array Formula: Can anybody help?

  1. #1
    Registered User
    Join Date
    01-02-2011
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    31

    Array Formula: Can anybody help?

    Hi All - I have an issue with an array formula that I am not sure how to resolve; I am hoping somebody on here could assist or point me in the right direction. I have a table that stores

    'PaymentDate', 'UserName', 'PaymentAmount'.
    31/10/2010 XYZ £100
    31/05/2011 XYZ £200
    31/10/2010 ABC £150

    Using the below formula if I select 'XYZ' from the dropdown it will correctly return £200 (the value for the MAX Date) however if I select 'ABC' it returns £0... I think this is occuring because I am looking at the MAX Date and it can't identify the username against it...

    Can anybody help?

    =SUM(IF((PaymentHistory!B2:B16=E7)*(PaymentHistory!A2:A16=MAX(PaymentHistory!A2:A16)),PaymentHistory!C2:C16))

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    re: Array Formula: Can anybody help?

    try this array (ctrl+shift+enter)

    =INDEX(PaymentHistory!C2:C16,MATCH(MAX(IF(PaymentHistory!B2:B16=E7,PaymentHistory!A2:A16))&E7,PaymentHistory!A2:A16&PaymentHistory!B2:B16,0))
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    01-02-2011
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    31

    re: Array Formula: Can anybody help?

    Amazing, how on earth did you know how to do that?

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    re: Array Formula: Can anybody help?

    Lucky guess

    Note that this will bring first value (for multiply values of same payment date).

    I would use Pivot Table if I were you.
    Last edited by zbor; 06-20-2011 at 05:51 AM.

+ 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