+ Reply to Thread
Results 1 to 9 of 9

Relation of 2 Tables

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    9

    Relation of 2 Tables

    Hello,

    I have 2 tables (Table 1 and Table 2) and I need to fill Item 3 of the Table 2 with the values of the Table 1. I could easily use the function Vlookup but how it works for the items not colored? It gives #N/A! (see attachment)

    Thanks!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Relation of 2 Tables

    A simple fill-in-from-above formula set-up should do it for you
    Assuming you've got the vlookup formulae in K3 down, with all the #N/As
    Put in L3: =K3
    Put in L4: =IF(ISNA(K4),L3,K4)
    Copy L4 down
    ---------------------------------------
    Success? Wave it, click on the little star at the bottom left of my responses

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

    Re: Relation of 2 Tables

    How about this in L3?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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.

  4. #4
    Registered User
    Join Date
    08-02-2012
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Relation of 2 Tables

    Thank you for your answer!
    What I need is a formula that fills the Item 3 of the Table 2 that is related with Table 1. For Item 1 = a and Item 2 = 1 I should have on Item 3 of Table 2 the value 123. The problem is for Item 2 between 2 and 5 that value should be the same (123) and should change for 456 for Item 3 = 6. It's a bit confuse but try to fil the column "K" with the values from the Table 1.

    Thanks!

  5. #5
    Registered User
    Join Date
    08-02-2012
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Relation of 2 Tables

    For Jacc:
    I think that's it! I will try this formula in my work and then I will tell if it works.
    Thank you very much!!

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

    Re: Relation of 2 Tables



    Forgot to mention, that is an array formula, it has to be entered with Ctrl + Shift + Enter.

  7. #7
    Registered User
    Join Date
    08-02-2012
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Relation of 2 Tables

    The formula works but the Table 1 should be sort by Item 2. Otherwise the formula doesn't work well.

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

    Re: Relation of 2 Tables

    How about this then? I tried one big formula with IF. Then I tried with helper column and using * instead of IF to see if it looks better.

    I added a column for testing to the left. Select a cell in the random column and hit the "Sort A->Z" -button to scramble the columns and see that it works.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-02-2012
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Relation of 2 Tables

    Thank you very much for your attention!
    In that example it works fine. I've got a larger table where i will test with that formula. I think it will work.

+ 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] Transpose certain columns and keep relation with row?
    By Ariadust in forum Excel General
    Replies: 2
    Last Post: 06-11-2013, 01:20 PM
  2. linking tables with access-style relation in excel
    By stephenjosephmurphy in forum Excel General
    Replies: 1
    Last Post: 01-23-2013, 09:19 PM
  3. Relation between two columns
    By sanbik in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-08-2012, 10:54 AM
  4. Classify numbers by relation
    By Jordans121 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2011, 05:11 PM
  5. preparing relation with 2 workbooks...
    By fmamc2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-04-2008, 10:03 AM

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