Multi-criteria sum with data from different tables

eric.vergne

New Member
Hello, I'm having a time figuring this problem out.

My Setup:
Sheet1, Table1 is a multiple column table. Column1 is employee name and column 2 is employee location. There are many more columns, but those are all that is important for this problem.

Sheet2, Table2 is also a multiple column table. Column1 uses data validation to force the user to select an employee name from a drop-down. The employee name list is compiled using the data in Column1 of Table1. The rest of the columns contain data from vairous lookups, indexes, and other calculations.

Sheet2, Table3 is also a multiple column table. The rows within this table contain various types of charges, for example facilities.

My problem:
In column2 of Table3, i need to sum all of the data in Column2 of Table2 and then multiply by a factor. However, i only need to sum the data for employees who are in certain locations. For example, if employee A and B (Table2, Column1) are both in location 1 (Table1, Column2), then sum the data in Table2, Column2 and multiply by X.

What i've tried:
Multiple formulas, incuding sumif, sum(if), and index, including combinations. I can get this to work simply if i include an additional column in Sheet2, Table2 that does a vlookup of Sheet1, Table1, Column2 and get's the location for the employee name selected in Sheet2, Table2, Column1. However, i don't want to do it this way. I only want Sheet2, Table2 to contain the selected employee name in Column1 and then the other columns to provide the calculations i already have present and working. I do not want to duplicate the location information from Table1. (Besides, that would be too simple!)

Any help would be appreciated.

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.
In table 3 column 2, type this formula:

=SUM(IF(ISNUMBER(MATCH(Table2Column1,IF(Table1Column2=Location1,Table1Column1),0)),Table2Column2))

Confirm with CTRL+SHIFT+ENTER

Worked perfectly. Thanks!

Replies
0
Views
298
Replies
1
Views
350
Replies
13
Views
287
Replies
5
Views
168
Replies
0
Views
219

1,196,409
Messages
6,015,103
Members
441,870
Latest member
kojack

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back