+ Reply to Thread
Results 1 to 4 of 4

Adding an If statement to an Index Match Formula

  1. #1
    Registered User
    Join Date
    11-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    2

    Adding an If statement to an Index Match Formula

    In the following formula I’d like to add If $B30 is #N/A, then the result of the formula should be 0. Does anyone have a suggestion on how to include this into my formula? I’ve tried adding an If statement before the index formula and that does not work. Basically if the result of the following formula is #N/A because cell $B30 is #N/A I’d like the formula to result in 0.

    =INDEX('E handset detail'!$D$11:$O$829,MATCH($B30,'E handset detail'!$A$11:$A$829,0),MATCH($B$26,'E handset detail'!$D$10:$O$10,0))

    Thank you in advance
    Last edited by brandiemz101; 11-16-2011 at 03:25 PM.

  2. #2
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: Adding an If statement to an Index Match Formula

    =IFERROR(INDEX('E handset detail'!$D$11:$O$829,MATCH($B30,'E handset detail'!$A$11:$A$829,0),MATCH($B$26,'E handset detail'!$D$10:$O$10,0)),0)
    will result in 0 on any error.
    Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Adding an If statement to an Index Match Formula

    Do you mean?

    =IF(ISNA($B30),0,INDEX('E handset detail'!$D$11:$O$829,MATCH($B30,'E handset detail'!$A$11:$A$829,0),MATCH($B$26,'E handset detail'!$D$10:$O$10,0)))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    11-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Adding an If statement to an Index Match Formula

    thank you - both options work. I appreciate your help!

+ 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