+ Reply to Thread
Results 1 to 6 of 6

Array formula using OFFSET, INDEX, INDIRECT & MATCH returns #N/A error (otherwise OK)

  1. #1
    Registered User
    Join Date
    05-06-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2013
    Posts
    41

    Array formula using OFFSET, INDEX, INDIRECT & MATCH returns #N/A error (otherwise OK)

    Greetings to all,

    I am a novice. Both in Excel and internet forums. I can usually find the answer I need by scouring such forums as these, but right now I'm stumped. I'm hoping some bright spark who reads this can provide me with a simple solution.

    On Sheet1 I have multiple columns of data (all text). On Sheet 2 I wish to extract particular segments of any given column.

    I am achieving the results I want with the following formula, however it is also returning #N/A errors which I am trying (unsuccessfully) to hide or otherwise eliminate.

    This is my formula:
    {=OFFSET(INDEX(INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),MATCH(E11,INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),0)),,,D12-E12,1)}

    I have tried nesting the whole thing in IFERROR(, IF(ISERROR, IF(ISNA & IF(ROWS(I$5:I5>$I$4)etc. - ($I$4 being the cell containing the row count for the data I am extracting). Frustratingly, they all return the same result - including the #N/A errors when all sought rows have been retrieved, but the formula keeps going.

    Being a novice, I'm not sure how much information is too much or too little.

    Below are the full formulas I have tried, but have failed.


    {=IFERROR(OFFSET(INDEX(INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),MATCH(E11,INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),0)),,,D12-E12,1),"")}

    {=IF(ISERROR(OFFSET(INDEX(INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),MATCH(E11,INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),0)),,,D12-E12,1)),"",OFFSET(INDEX(INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),MATCH(E11,INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),0)),,,D12-E12,1))}

    =IF(ISNA(OFFSET(INDEX(INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),MATCH(E11,INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),0)),,,D12-E12,1)),"",OFFSET(INDEX(INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),MATCH(E11,INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),0)),,,D12-E12,1))}

    {=IF(ROWS(I$5:I5)>$I$4,"",(OFFSET(INDEX(INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),MATCH(E11,INDIRECT("Movie_Details!"&"R"&$D$8&"C"&$D$5&":"&"R"&$D$9&"C"&$D$5,FALSE),0)),,,D12-E12,1)))}


    I hope I have made my problem clear enough to tackle.

    Thanks in advance,
    Melpa

    P.S. I have attempted to attach the workbook.
    Attached Files Attached Files
    Last edited by melpa; 05-17-2016 at 03:49 AM. Reason: Adding workbook & correcting errors

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Array formula using OFFSET, INDEX, INDIRECT & MATCH returns #N/A error (otherwise OK)

    Hello and welcome to the forum.

    I would urge you to rethink your data layout. You are making any analysis far too complicated.

    You should always capture data in a simple two dimensional table and worry about reporting information from it afterwards. Without exception doing this you will always be able to easily obtain management information. Rarely is this the case if you start the other way round.
    You will also throw open the whole wonderful world of the powerful Pivot table functionality.

    So before you get too far with this I'd create a single sheet database with the following three column labels

    Name of Movie
    Information Type ' * rows here will consist of one of the 13 or so item of text you currently have in bold on the Movie Details sheet.
    Description

    So it would look like the following

    Movies.JPG


    The * values could be Validation drop down cells from which you could pick values. The way I normally arrange these things is to have a single data entry row above the database in which the new values are entered, then a button which runs a macro that adds the new record to the database.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-06-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2013
    Posts
    41

    Re: Array formula using OFFSET, INDEX, INDIRECT & MATCH returns #N/A error (otherwise OK)

    Thank you, Richard, for your prompt and considered reply. I will study your advice carefully. I have 600 text files of movie details in this format and at this point it may be beyond me to get them into the arrangement you recommend.

    I have already completed a much simpler two dimensional table of the same 600 movies with several columns of details and it is, as you say, definitely easier to work with. So my original problem was how to add the extra & extensive details you saw in my workbook to my existing table.
    As that seemed beyond my capability, I started down this road...

    My long term intention is to call the details into a user form.

    I guess I'd still like to know how to get rid of the #n/a errors in case I am unable to follow your advice.

    Thanks for your time.
    Melpa

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Array formula using OFFSET, INDEX, INDIRECT & MATCH returns #N/A error (otherwise OK)

    Hi,

    The following macro will create a three column database for you based on your Movie Details sheet. See also attached sheet.
    The new data sheet is VBA code name 'Sheet3' which is referenced in the macro.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Richard Buttrey; 05-17-2016 at 09:50 AM.

  5. #5
    Registered User
    Join Date
    05-06-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2013
    Posts
    41

    Re: Array formula using OFFSET, INDEX, INDIRECT & MATCH returns #N/A error (otherwise OK)

    I am very grateful!

    I wouldn't have even known to ask for this. I will study it this evening.

    Thanks again.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Array formula using OFFSET, INDEX, INDIRECT & MATCH returns #N/A error (otherwise OK)

    My pleasure and thanks for the rep.

+ 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] 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
  2. Array formula using INDEX, MATCH and INDIRECT fails with #VALUE
    By BikeJockey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-17-2016, 03:52 PM
  3. Replies: 13
    Last Post: 01-24-2016, 09:27 PM
  4. [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
  5. Excel array formula, offset, index, match...
    By flippertie in forum Excel General
    Replies: 6
    Last Post: 03-17-2011, 09:42 AM
  6. Match, Index, Indirect, Offset
    By Mark McDonough in forum Excel General
    Replies: 2
    Last Post: 06-18-2006, 11:55 AM
  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

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