+ Reply to Thread
Results 1 to 10 of 10

Change Index/Match Formula to Skip if formula returns N/A?

  1. #1
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Change Index/Match Formula to Skip if formula returns N/A?

    Hi All,

    I was wondering if it would be possible for this formula to be adapted so that if it returns #n/a, it will just skip and look in the next cell & also return all values that meet the criteria instead of the just the first value that does.

    Please see the formula below:

    Please Login or Register  to view this content.
    I hope that this may be possible.

    Thanks

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Change Index/Match Formula to Skip if formula returns N/A?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Change Index/Match Formula to Skip if formula returns N/A?

    Thank you for your response,

    I have attached a workbook that i think helps show what i am looking for.

    The entries tab is where the formula is located and the GCSE tab is where the data is being pulled from.

    I hope this gives you a better understanding.

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Change Index/Match Formula to Skip if formula returns N/A?

    I am "out of the office" for a couple of hours but hopefully someone will respond before I return.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Change Index/Match Formula to Skip if formula returns N/A?

    See the attached:

    In "Entries" column J contains a list of courses and is a named range called "Courses"

    B2 has a drop-down of the course list

    Column B has formula which selects on course in B2

    =IFERROR(INDEX('Full GCSE & SC GCSE'!$A$3:$A$34,SMALL(IF(INDEX('Full GCSE & SC GCSE'!$P$3:$CY$34,,MATCH($B$2,'Full GCSE & SC GCSE'!$P$1:$CY$1,0))="Y",ROW('Full GCSE & SC GCSE'!$A$3:$A$34)-ROW($A$3)+1,""),ROWS($A$3:A3))),"")

    Enter with Ctrl+Shift+Enter

    If done correctly, you will see brackets { ...} appear round the formula

    I have removed merged cells: do NOT use merged cells as they cause problems particularly with formulae.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Change Index/Match Formula to Skip if formula returns N/A?

    Thanks John,

    That works perfect! I really appreciate this!!

    I have another quick question would it be possible to make this work for the result of the course as well?
    So that next to the student name it would produce the result for that student in the course?
    Would this be able to be done by adapting the formula already being used or would this need another tactic?

    Thanks

    James

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Change Index/Match Formula to Skip if formula returns N/A?

    Which column is the result ... "Actual Grade" ?

  8. #8
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Change Index/Match Formula to Skip if formula returns N/A?

    Yes sorry that is correct. Should of mentioned that

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Change Index/Match Formula to Skip if formula returns N/A?

    Try

    in C5 of "Entries" (Predicted Grade)

    =IFERROR(INDEX('Full GCSE & SC GCSE'!$P$3:$CY$36,MATCH($B5,'Full GCSE & SC GCSE'!$A$3:$A$36,0),MATCH($B$2,'Full GCSE & SC GCSE'!$P$1:$CY$1,0)+3),"")

    in D5 of "Entries" (Grade Achieved)

    =IFERROR(INDEX('Full GCSE & SC GCSE'!$P$3:$CY$36,MATCH($B5,'Full GCSE & SC GCSE'!$A$3:$A$36,0),MATCH($B$2,'Full GCSE & SC GCSE'!$P$1:$CY$1,0)+4),"")
    Attached Files Attached Files
    Last edited by JohnTopley; 01-26-2017 at 04:29 PM.

  10. #10
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Change Index/Match Formula to Skip if formula returns N/A?

    Thank you very much!
    I can see how this works a little bitmore now!
    I am encountaring one issue as further up the sheet the column would need to be three not plus 4, i can solve this by just adding a extra coloumn that just gets left blank, unless.there is another way to get round this!?

+ 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. Replies: 5
    Last Post: 05-18-2016, 04:50 AM
  2. [SOLVED] Index, Match formula returns #NA error if result is from an average formula.
    By billrogers184 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-28-2016, 11:43 AM
  3. Replies: 13
    Last Post: 01-24-2016, 09:27 PM
  4. Replies: 4
    Last Post: 04-28-2014, 07:24 PM
  5. [SOLVED] index & match formula with two criteria that returns answer from chart
    By jamied2000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-24-2014, 09:50 AM
  6. [SOLVED] MATCH/INDEX Formula Returns an Error Instead of 0
    By livifivil in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-07-2013, 04:18 PM
  7. [SOLVED] Looking for formula index/match-type that returns an array
    By Tom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-01-2005, 05:06 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