+ Reply to Thread
Results 1 to 7 of 7

Index Error Pulling incorrect date

  1. #1
    Registered User
    Join Date
    05-11-2013
    Location
    Shrewsbury
    MS-Off Ver
    Excel 2007
    Posts
    16

    Index Error Pulling incorrect date

    Hi Guys,

    I could do with some assistance with this error, I have attached the file which shows the issue I have. In Sheet2, column B, Row 22, pulls in a date of 29/5/2013, when you look in Sheet1 it should be pulling in 28/5/2013 ?, I had help with this formula below and cannot understand why it is doing this ?
    =IFERROR(INDEX(Sheet1!$B$2:$C$300,SMALL(IF(Sheet1!$C$2:$C$300=$A$1,ROW(Sheet1!$C$2:$C$300)),ROW(Sheet1!20:20)),1),"")

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Index Error Pulling incorrect date

    Your INDEX is beginning in Row 2.

    The Row# of an index is not strictly a Row #, it's the Row Position # relative to the Indexed range.
    So if your indexing A2:A10, then the 2nd index row# is actually going to be A3..NOT A2.

    If the result of your SMALL IF pulls the Row # From C2:C300, say the smallest is in C5, then the small if returns 5.
    But the INDEX #5 of B2:B300 is actually B6 NOT B5

    Try including row 1 in the INDEX and ROW functions
    =IFERROR(INDEX(Sheet1!$B$1:$C$300,SMALL(IF(Sheet1!$C$1:$C$300=$A$1,ROW(Sheet1!$C$1:$C$300)),ROW(Sheet1!20:20)),1),"")
    Last edited by Jonmo1; 05-30-2013 at 01:38 PM.

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Index Error Pulling incorrect date

    Why not use Advanced Filter?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-11-2013
    Location
    Shrewsbury
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Index Error Pulling incorrect date

    Thanks Jonmo1, I never noticed the '1' was missing.

  5. #5
    Registered User
    Join Date
    05-11-2013
    Location
    Shrewsbury
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Index Error Pulling incorrect date

    Thanks Jiejenn, I will look into the advanced filter.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Index Error Pulling incorrect date

    Great, glad to help.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Index Error Pulling incorrect date

    Try this...

    Array entered** in B3:

    =IFERROR(INDEX(Sheet1!B:B,SMALL(IF(Sheet1!C$2:C$300=A$1,ROW(Sheet1!C$2:C$300)),ROWS(B$3:B3))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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