+ Reply to Thread
Results 1 to 6 of 6

matching a value from one sheet and returning a value from a row in sheet 2

  1. #1
    Registered User
    Join Date
    11-26-2013
    Location
    Calgary Alberta Canada
    MS-Off Ver
    Excel 2013
    Posts
    6

    matching a value from one sheet and returning a value from a row in sheet 2

    I posted this question a couple of weeks ago and received some great help. The problem is the formula no longer works. My issue is I have a multi page spreadsheet that I track inventory on.
    Sheet one is the inventory sheet it has 700plus rows by 16 columns


    My second sheet is where I kit or group inventory. Certain inventory items. ie nu10001 contains 5 items from inventory. This sheet has 100 rows and 19 columns. This sheet is where I will input the location of a kit. I need that location info to show up on the inventory sheet in the location column for each piece of inventory in the kit.

    This is the formula I was using:
    =INDEX(Kits!A:A,MAX(IF(Kits!D$3:T$100=A4,ROW(Kits!D$3:T$100))))

    The formula was working fine but now I get #N/A error

    Thanks for looking
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: matching a value from one sheet and returning a value from a row in sheet 2

    Your formulas don't work because they can't handle the errors in the other sheet. I added some errorhandling and now it works.

    The second workbook is how I would do it. Using Excel's Table feature makes it much easier to maintain tables with varying size. No need to update formulas when new rows are added. Also, when adding new rows the table expand automatically and formulas are copied along.
    Attached Files Attached Files
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Registered User
    Join Date
    11-26-2013
    Location
    Calgary Alberta Canada
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: matching a value from one sheet and returning a value from a row in sheet 2

    Thanks for the reply. I have not yet tried using the table function in excel. I do not see how you converted the sheets to tables or where the names in teh formulas come from.

  4. #4
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: matching a value from one sheet and returning a value from a row in sheet 2

    Go to the Insert tab, second from right is Tables. This will convert any list or table you are standing in to a Excel Table. The names are generated automatically and are based on the names of the headers in the table. The name of the entire table (Table1 Table2 etc) are generated automatically by excel.

    To change the entire table name, select any cell in the table. At the very top of your screen there is Table Tools and under that Design. Click that. To the very left is a field where you can type in any table name you want.

    You can refer to different parts of the Table by a naming convention. Since the whole thing expands automatically these names are similar in function to dynamic named ranges. There is a naming convention that tells you how to refer to the different parts of the Table as described in the links below. Don't worry if you find that too boring to read, you don't have to.
    In real life you simply select the parts you are interested in when typing the formula and the correct name reference will be inserted.
    Make a simple formula just to test and you will see what I mean. Or just type = in a cell outside the Table and select a column and you'll see.

    The following parts are named and can be referred to(just what I can think of now):
    - The entire header row
    - One header cell
    - The entire table, including headers
    - The entire table, without headers
    - A entire column or columns, with headers
    - A entire column or columns, without headers (very useful)
    - Any cell that is on the same row as you type the formula (very useful)

    Some boring links:
    http://office.microsoft.com/en-us/ex...010048546.aspx
    http://www.techrepublic.com/blog/10-...-table-object/
    http://www.jkp-ads.com/articles/Excel2007tables.asp

  5. #5
    Registered User
    Join Date
    11-26-2013
    Location
    Calgary Alberta Canada
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: matching a value from one sheet and returning a value from a row in sheet 2

    Quote Originally Posted by Jacc View Post
    Go to the Insert tab, second from right is Tables. This will convert any list or table you are standing in to a Excel Table. The names are generated automatically and are based on the names of the headers in the table. The name of the entire table (Table1 Table2 etc) are generated automatically by excel.

    To change the entire table name, select any cell in the table. At the very top of your screen there is Table Tools and under that Design. Click that. To the very left is a field where you can type in any table name you want.

    You can refer to different parts of the Table by a naming convention. Since the whole thing expands automatically these names are similar in function to dynamic named ranges. There is a naming convention that tells you how to refer to the different parts of the Table as described in the links below. Don't worry if you find that too boring to read, you don't have to.
    In real life you simply select the parts you are interested in when typing the formula and the correct name reference will be inserted.
    Make a simple formula just to test and you will see what I mean. Or just type = in a cell outside the Table and select a column and you'll see.

    The following parts are named and can be referred to(just what I can think of now):
    - The entire header row
    - One header cell
    - The entire table, including headers
    - The entire table, without headers
    - A entire column or columns, with headers
    - A entire column or columns, without headers (very useful)
    - Any cell that is on the same row as you type the formula (very useful)

    Some boring links:
    http://office.microsoft.com/en-us/ex...010048546.aspx
    http://www.techrepublic.com/blog/10-...-table-object/
    http://www.jkp-ads.com/articles/Excel2007tables.asp
    I see that it works on the examples you gave. I copied the formulas over to my main sheet and I get an error. I have included the entire file this time. I really appriciate the help.

    Got it now thanks. My own editing errors
    Attached Files Attached Files
    Last edited by Dswenson; 12-11-2013 at 05:46 PM. Reason: SOLVED

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: matching a value from one sheet and returning a value from a row in sheet 2

    You haven't copied the same formula throughout the two columns. Find a place in the middle of the column where you know the formula works and then just copy it all the way up and down.
    Normally when you change a formula at the first row in a table it will instantly copy itself down the whole column. Dunno if there is a setting that determines that or something. Or maybe you only need to have the same throughout the columns to trigger it.

+ 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: 6
    Last Post: 01-01-2013, 02:37 AM
  2. [SOLVED] Return comment to master sheet after matching to source sheet name and cell number
    By jeffreybrown in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-21-2012, 05:09 PM
  3. Filtering values from a sheet and returning them in a column on a different sheet
    By Adam Beauregard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-11-2011, 05:40 PM
  4. Replies: 0
    Last Post: 06-11-2011, 01:21 PM
  5. Replies: 5
    Last Post: 04-13-2007, 06:58 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