+ Reply to Thread
Results 1 to 8 of 8

Look up in two sheets and populate SUM in third sheet - stuck up need help - xls 2007

  1. #1
    Registered User
    Join Date
    06-28-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    4

    Look up in two sheets and populate SUM in third sheet - stuck up need help - xls 2007

    Calling all experts for help please. Been stuck up for hours now.
    I have three sheets in an xls.

    Sheet 1
    EMP-Weekly Sal
    EMP ID || Week || Salary
    1 || 1 || 1000
    2 || 1 || 1500
    3 || 1 || 2000
    1 || 2 || 1500
    2 || 2 || 1500
    3 || 2 || 1500

    Sheet 2
    EMP-Country-Allocation
    EMP ID || CNTRY || ALLOCATION
    1 || IND || 0.5
    1 || MLY || 0.5
    2 || IND || 0.3
    2 || SGP || 0.7
    3 || IND || 0.4
    3 || SGP || 0.5
    3 || MLY || 0.1

    Sheet 3
    Country-SAL-Expenses
    COUNTRY || Expenses
    IND
    SGP
    MLY


    Now in Sheet 3, expenses column, I need the totals of expenses country wise.
    Basically output would be
    Sheet 3
    Country-SAL-Expenses
    COUNTRY || Expenses
    IND || 3550
    SGP || 3850
    MLY || 1600


    Similar sample xl attached for reference as well.

    Regards
    Lily
    Attached Files Attached Files

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Look up in two sheets and populate SUM in third sheet - stuck up need help - xls 2007

    Hi Lily,

    welcome to the forum.

    Employee 1 is there in India and Singapore, now which one to consider for which country in salary sheet ?


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    06-28-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Look up in two sheets and populate SUM in third sheet - stuck up need help - xls 2007

    Hi deepak
    Each country should be considered based on employees allocation in the specific country.
    0.4 would mean 40% of his salary will be borne by that country.

    Thanks
    Lily

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Look up in two sheets and populate SUM in third sheet - stuck up need help - xls 2007

    Okay.. but my query remains unanswered.... how will you differentiate between SGP and IND employee ?


    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Registered User
    Join Date
    06-28-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Look up in two sheets and populate SUM in third sheet - stuck up need help - xls 2007

    Hi Dilip

    In the example, we need to check the salaries of the employees, then check their allocation in another sheet to find out for which country they clocked the effort as one employee can be part of two countries' projects.
    Lastly the expenses needed are at country level - so need to check the emp salary, her allocation in the country and derive the expense incurred per country. All of this in one formula.

    Like for my example - For India
    EMP 1 - 0.25 allocation which means IND expense is 25% of his salary which is 1000+ 1500 = 25% of 2500 = 625
    EMP 2 - 0.5 allocation which means IND expense is 50% of his salary which is 1500 + 1500 = 50% of 3000 = 1500
    EMP 3 - 0.6 allocation which means IND expense is 60% of his salary which is 1500 + 2000 = 60% of 3500 = 2100.

    So total expense for India - 4225.

    Hope this clarifies.

    Thanks
    Lily

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Look up in two sheets and populate SUM in third sheet - stuck up need help - xls 2007

    Hi Lily,

    Let me share the approach.
    Let say ..On sheet "country-exp", I need to find the total expense for SGP.
    Now I came to sheet "Emp-Allocation". Here I saw that employee 2 and 1 belongs to SGP

    2 SGP 0.5
    1 SGP 0.75

    and Now I went to sheet "Emp-Sal", and I see duplicate entries for employee 2 and 1 and this is my concern as I don't know which 2 or which 1 should be considered




    Regards,
    DILIPandey
    <click on below * if this helps>

  7. #7
    Registered User
    Join Date
    06-28-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Look up in two sheets and populate SUM in third sheet - stuck up need help - xls 2007

    Hi Dilip

    Both the entries should be considered.
    Employee Salary may be due to two projects of that region he is working and clocking separately or you can also consider, employee clocking across two weeks differently, so in effect both the entries to be added up and are not duplicate but multiple entries for the employee.

    Regards
    Lily

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Look up in two sheets and populate SUM in third sheet - stuck up need help - xls 2007

    Okay Lily, if that is the case you can use below formula:-

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


    see attached :-
    sample.xls

    Regards,
    DILIPandey
    <click on below * if this helps>

+ 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