+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Match 2 columns to return the value of the third column

  1. #1
    Registered User
    Join Date
    03-01-2011
    Location
    Timisoara, Romania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Match 2 columns to return the value of the third column

    I have 3 columns in the first sheet: department, position and salary and i want in the second sheet to insert a formula that returns the salary of the manager from the financial department.
    Last edited by anansc89; 03-01-2011 at 06:27 PM.

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

    Re: help formula

    Welcome to the forum,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST
    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.

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

    Re: Match 2 columns to return the value of the third column

    Try:

    =Sumproduct(--(DeptRange=Dept),--(PositionRange=Position),SalaryRange)

    where you can apply the references to named ranges or change to the actual ranges containing the information.

  4. #4
    Registered User
    Join Date
    03-01-2011
    Location
    Timisoara, Romania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Match 2 columns to return the value of the third column

    ok, this formula worked partially for me
    =INDEX('sheet1'!$I:$I,MATCH(1,('sheet1'!$D:$D=sheet2!$E$3)*('sheet1'!$E:$E=sheet2!$I$2)*('sheet1'!$M:$M=sheet2!$I$4),0))/F$5

    but the problem that i still have is that in the sheet1 column I:I are the salaries of 16 workers that are in the same department and i need the sum of those salaries

    please help with the formula?

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

    Re: Match 2 columns to return the value of the third column

    Did you see/try using the formula I gave above and adapting to your ranges?

    Not sure what is in F$5 but you can divide the result of the Sumproduct by that too...

    and you can add a 3rd condition to the Sumproduct, as I see you now have 3 conditions to meet.

  6. #6
    Registered User
    Join Date
    03-01-2011
    Location
    Timisoara, Romania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Match 2 columns to return the value of the third column

    i've tried with sumproduct but it didn't work

    I'll explain the formula:
    =INDEX('sheet1'!$I:$I,MATCH(1,('sheet1'!$D:$D=sheet2!$E$3)*('sheet1'!$E:$E=sheet2!$I$2)*('sheet1'!$M:$M=sheet2!$I$4),0))/F$5

    sheet1'!$I:$I = the column with the salaries
    sheet1'!$D:$D = the column with the departments
    sheet2!$E$3 = the name of the department
    sheet2!$I$2 = the name of the position
    sheet1'!$E:$E = the column with the position of the worker
    sheet1'!$M:$M = the column with the month of the salary
    sheet2!$I$4 = the number of the month
    F$5 = the number of workers (in my case there are 16 workers with the same position and in the same department)

    I want that the formula will : 1. match the department, position and month
    2. sum up the salaries of workers found within the criteria
    3. divide the sumby the number of workers found (16)

    Thank you so much for your help

  7. #7
    Registered User
    Join Date
    03-01-2011
    Location
    Timisoara, Romania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Match 2 columns to return the value of the third column

    sorry, i've tried your formula again and it worked

    please don't be mad

+ 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