+ Reply to Thread
Results 1 to 13 of 13

Index Match to pull negative and positive data

  1. #1
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Index Match to pull negative and positive data

    I have been using index match function for a quite long time.
    What currently I have a problem is that,I have to pull in one column negative number and another only positive number by matching.Here,negative and positive number are in same column.

    =Index($F$12:$F$257,match($E5,$G$12:$G$257,0))

    Also,Reference,$E5 is blank then it will alter the reference to $C5.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Index Match to pull negative and positive data

    You are using MATCH with the third argument 0. This means find an exact match. It doesn't matter if the number is negative or positive. We need a more complete explanation of what you are trying to do.

    As for the second part
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Index Match to pull negative and positive data

    Ok,plz find enclosed in attachment a sample data.I hope this will be suffice info.Currently there is #N/A error.
    Results are required in column G,H which is highlighted with green.
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,784

    Re: Index Match to pull negative and positive data

    Your IF clause is incomplete:

    =INDEX(Data!$E$12:$E$16,MATCH(IF(Result!$E2="",Result!$B2,Result!$E2),Data!$F$12:$F$16,0))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Index Match to pull negative and positive data

    Thanx for pointing out.

    Kindly let me know about pulling negative and positive value separately.I have tried but looking for a short one.

    For positive column,
    Please Login or Register  to view this content.
    For Negative column
    Please Login or Register  to view this content.
    Last edited by paradise2sr; 07-14-2019 at 04:15 AM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,784

    Re: Index Match to pull negative and positive data

    Positive: =IF(INDEX(Data!$E$12:$E$16,MATCH(IF(Result!$E2="",Result!$B2,Result!$E2),Data!$F$12:$F$16,0))>=0,INDEX(Data!$E$12:$E$16,MATCH(IF(Result!$E2="",Result!$B2,Result!$E2),Data!$F$12:$F$16,0)),"")

    Negative: =IF(INDEX(Data!$E$12:$E$16,MATCH(IF(Result!$E2="",Result!$B2,Result!$E2),Data!$F$12:$F$16,0))<0,INDEX(Data!$E$12:$E$16,MATCH(IF(Result!$E2="",Result!$B2,Result!$E2),Data!$F$12:$F$16,0)),"")

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,784

    Re: Index Match to pull negative and positive data

    Why do the formula need to be shorter? They work. Aesthetics don't matter.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,784

    Re: Index Match to pull negative and positive data

    These will work:

    =MAX(0,INDEX(Data!$E$12:$E$16,MATCH(IF(Result!$E2="",Result!$B2,Result!$E2),Data!$F$12:$F$16,0)))

    =MIN(0,INDEX(Data!$E$12:$E$16,MATCH(IF(Result!$E2="",Result!$B2,Result!$E2),Data!$F$12:$F$16,0)))

    HOWEVER, you might then want to conditionally format the cells to hide the 0 values.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,784

    Re: Index Match to pull negative and positive data

    Please Login or Register  to view this content.
    This will change the negative value to a positive one - why are you doing this?

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Index Match to pull negative and positive data

    Have you upgraded to a newer version of excel than that shown on your forum profile? For excel 2019 / or 365, you could use
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    for positive and negative results respectively.

  11. #11
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Index Match to pull negative and positive data

    Thanx all of you.My problem has now been solved and thanx for the consistent support.
    Last edited by paradise2sr; 07-14-2019 at 07:07 AM.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,784

    Re: Index Match to pull negative and positive data

    Great. Don't forget to mark the thread as solved.

  13. #13
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Index Match to pull negative and positive data

    I have already done mam.Thanx for your kind help.

+ 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. [SOLVED] how do i pull max number if its negative or positive from an array
    By kevinu in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-15-2017, 12:01 PM
  2. How to extract matching negative and positive value that match across several columns
    By daisyhill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-15-2014, 05:47 PM
  3. Match the negative value v/s corresponding positive in same row
    By Roselin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2014, 03:06 AM
  4. adjusting if/match formula to allow positive and negative movement
    By neowok in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-17-2013, 04:13 AM
  5. Replies: 2
    Last Post: 11-21-2012, 07:27 AM
  6. Match positive and negative values (with different assignments)
    By nicklasj in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2012, 01:24 PM
  7. Convert negative to positive in sheet containing both positive/negative numbers
    By sa02000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2010, 07:52 PM

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