+ Reply to Thread
Results 1 to 9 of 9

Use info of another table

Hybrid View

  1. #1
    Registered User
    Join Date
    10-12-2011
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    26

    Use info of another table

    Hi,

    I have a question.
    Currently, i have 3 tables:

    [name] [function]
    Johan Cleaner
    Bert Security
    Gert Security

    [name] [made hours] (hours)
    Johan 3
    Gert 2
    Bert 3

    [function] [total hours]
    Cleaner 3
    Security 5

    De total hours have to be calculated by a function. How can i do this?

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Use info of another table

    Use
    sumif
    formula

    regards
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

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

    Re: Use info of another table

    If you can sort the first table by first column, alphabetically, then you can try this.

    Assuming Table 1 (sorted by 1st column, ascending) is in A1:B4 (first row headers)

    and table 2 is in E1:F4 (first row headers)

    and table 3 is in H1:I3 (first row headers)

    then if H2 contains Cleaner, in I2 enter:

    =SUMPRODUCT(--(LOOKUP($E$2:$E$4,$A$2:$B$4)=H2),$F$2:$F$4)

    copied down.
    Attached Files Attached Files
    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
    10-12-2011
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Use info of another table

    Well, these tables are in 3 different workbooks.
    And i can't get the function names on alphabetic order (of course i know how, but ít's an export of another application, ordered by date).

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

    Re: Use info of another table

    Ok, so let's now assume in Sheet1 of each workbook are the tables (and they are currently all open) and they have headers in Row 1... so data starts in Row 2 of each sheet.

    In Boo1.xls is the first table, starting at A1:B4

    in Book2.xls is the second table, starting at A1:B4

    in Book3.xls is third table (summary), starting A1:B3

    in B2 of third table use formula:

    =SUMPRODUCT(--(ISNUMBER(MATCH([Book2.xls]Sheet1!$A$2:$A$4&A2,[Book1.xls]Sheet1!$A$2:$A$4&[Book1.xls]Sheet1!$B$2:$B$4,0))),[Book2.xls]Sheet1!$B$2:$B$4)

    copied down.

    You can close the first 2 workbooks after this.

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

    Re: Use info of another table

    Using the sample you last posted formula would be:

    =SUMPRODUCT(--(ISNUMBER(MATCH(Uren!$A$1:$A$3&A1,Functies!$A$1:$A$3&Functies!$B$1:$B$3,0))),Uren!$B$1:$B$3)

    copied down.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-12-2011
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Use info of another table

    See attachtment for example.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    10-12-2011
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Use info of another table

    Worked! Thanks~!
    Last edited by Roeltje; 10-12-2011 at 09:22 AM.

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

    Re: Use info of another table

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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