+ Reply to Thread
Results 1 to 11 of 11

Index, Match, Vlookup in a range - error for negative values

  1. #1
    Registered User
    Join Date
    03-17-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51

    Index, Match, Vlookup in a range - error for negative values

    Hi Guys,

    I have tried searching the forum for help but I can't find an answer.

    So, I have a list of days due (Column B) to deadline.
    I want to lookup the number based on the Type (Column A) in Column E and lookup the days due value (Column B) in F-G and return the value in column H (Highlighted Yellow)

    Can you please help???

    Function used: {=INDEX($H$2:$H$42,MATCH(1,IF($F$2:$F$42<=B35,IF($G$2:$G$42>=B35,1)),0))}
    Function used: {=IF($E$2:$E$42=A2,VLOOKUP(B2,$F$2:$G$42,TRUE),"")}

    it might be something simple

    File attached
    Attached Files Attached Files
    Last edited by Tai1001; 03-01-2018 at 03:32 PM.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Index, Match, Vlookup in a range - error for negative values

    All of the negatives in columns F and G have min > max.

    Remember that the larger the negative number is, the smaller the value it has.

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

    Re: Index, Match, Vlookup in a range - error for negative values

    Take the formula in C5 for example

    =INDEX($H$2:$H$42,MATCH(1,IF($F$2:$F$42<=B5,IF($G$2:$G$42>=B5,1)),0))

    There are no cells that meet this criteria
    IF($F$2:$F$42<=B5
    If B5 = -31, then
    There are No values in F are less than or equal to B5.

  4. #4
    Registered User
    Join Date
    03-17-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51

    Re: Index, Match, Vlookup in a range - error for negative values

    Sorry I attached the wrong file, correct one attached. my formula based on two criteria isn't working :/

  5. #5
    Forum Contributor
    Join Date
    07-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    104

    Re: Index, Match, Vlookup in a range - error for negative values

    -999999 < -2.01, so there are no numbers between a min of -2.01 and a max of -999999.

    Switch it to a min of -999999 and a max of -2.01. Similarly for all negative numbers.

    Edit: Ninja'd

  6. #6
    Registered User
    Join Date
    03-17-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51

    Re: Index, Match, Vlookup in a range - error for negative values

    Quote Originally Posted by SlipEternal View Post
    -999999 < -2.01, so there are no numbers between a min of -2.01 and a max of -999999.

    Switch it to a min of -999999 and a max of -2.01. Similarly for all negative numbers.

    Edit: Ninja'd

    Thanks for this. so it brings back the correct status. BUT i still need to have it lookup the Type (Column A) in Column E. (Orange columns)

    This is an extract of a larger dataset.
    Attached Files Attached Files
    Last edited by Tai1001; 03-01-2018 at 03:13 PM.

  7. #7
    Forum Contributor
    Join Date
    07-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    104

    Re: Index, Match, Vlookup in a range - error for negative values

    I used SUMPRODUCT instead of an array formula.
    Attached Files Attached Files

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Index, Match, Vlookup in a range - error for negative values

    I don't get it.

    Why does the formula have to look at column A at all? All of the 9 minimums, maximums, and status' just repeat for all 5 types.

    Also, what should 0 days return? "Due Today" or "Backlog 0-14 days"?
    Both have a min of 0 in your lookup table.

    Attached is a workbook that has the lookup table in a cleaner format showing this.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-17-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51
    Quote Originally Posted by 63falcondude View Post
    I don't get it.

    Why does the formula have to look at column A at all? All of the 9 minimums, maximums, and status' just repeat for all 5 types.

    Also, what should 0 days return? "Due Today" or "Backlog 0-14 days"?
    Both have a min of 0 in your lookup table.

    Attached is a workbook that has the lookup table in a cleaner format showing this.
    Hi,

    Thanks for the reply, the column a is important be a use this data is an extract of a larger set.
    The range can vary depending on the type.

  10. #10
    Forum Contributor
    Join Date
    07-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    104

    Re: Index, Match, Vlookup in a range - error for negative values

    Quote Originally Posted by Tai1001 View Post
    Hi,

    Thanks for the reply, the column a is important be a use this data is an extract of a larger set.
    The range can vary depending on the type.
    If a solution is provided, please mark the thread as solved.

  11. #11
    Registered User
    Join Date
    03-17-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51

    Re: Index, Match, Vlookup in a range - error for negative values

    Hi All,

    Thank you so much for your help!!

    @SlipEternal
    @63falcondude
    @Jonmo1

    you guys are great!

    Sorry for the delay, I have been travelling!

+ 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. Perplexing unknown error on index/match and vlookup...
    By rn0982 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-13-2015, 11:55 AM
  2. Looking for Values in Different Columns - VLOOKUP, MATCH, INDEX ???
    By juandyer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-24-2015, 01:41 AM
  3. [SOLVED] Vlookup/index/match to return all values that match
    By Asil01 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-09-2014, 12:49 PM
  4. Replies: 3
    Last Post: 05-19-2014, 02:01 PM
  5. VLOOKUP/INDEX/MATCH to return all values that match
    By lijia00 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2014, 11:56 AM
  6. [SOLVED] Index, Match not working. Can't even get Vlookup to work. Probably ID10T error.
    By Alias1431 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-09-2013, 03:39 PM
  7. Is there anyway to use Vlookup for negative values or a range of values?
    By excelplshelp1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-28-2008, 10:19 AM

Tags for this Thread

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