+ Reply to Thread
Results 1 to 2 of 2

Index formula with multiple values only returns correct values on first item

  1. #1
    Registered User
    Join Date
    10-17-2012
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    1

    Index formula with multiple values only returns correct values on first item

    My 'Log' worksheet references my 'funding string' worksheet. The 'funding string' worksheet contains up to 9 of the same values that will match on "N?" in my Log file. I need it to return the final value in the row from the "funding string" worksheet until no more values are found.

    Am using the following formula (as an array):

    =INDEX('FUNDING STRING LIST'!$M$3:$M$1520,SMALL(IF('FUNDING STRING LIST'!$C$3:$C$1520=$N6,ROW('FUNDING STRING LIST'!$C$3:$C$1520)-MIN(ROW('FUNDING STRING LIST'!$C$3:$C$1520))+1,""),ROWS('FUNDING STRING LIST'!M$3:M3)))

    When the value in N changes in the current worksheet, the next highest value from the "funding string" worksheet populates as I want. The formula changes based on the row it is in. For example, the next row's formula is:

    =INDEX('FUNDING STRING LIST'!$M$3:$M$1520,SMALL(IF('FUNDING STRING LIST'!$C$3:$C$1520=$N7,ROW('FUNDING STRING LIST'!$C$3:$C$1520)-MIN(ROW('FUNDING STRING LIST'!$C$3:$C$1520))+1,""),ROWS('FUNDING STRING LIST'!M$3:M4)))

    Once the value in 'N' changes to another value, #NUMs are returned. The only way to get the formula to return the correct value is to "reset" the formula so that the last "rows" function is as follows:

    =INDEX('FUNDING STRING LIST'!$M$3:$M$1520,SMALL(IF('FUNDING STRING LIST'!$C$3:$C$1520=$N11,ROW('FUNDING STRING LIST'!$C$3:$C$1520)-MIN(ROW('FUNDING STRING LIST'!$C$3:$C$1520))+1,""),ROWS('FUNDING STRING LIST'!M$3:M3)))

    I have attached my file and highlighted the cells with the formula in question. Any guidance will be much appreciated!

    Thanks in advance,

    Amy

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Index formula with multiple values only returns correct values on first item

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Ben Van Johnson

+ 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