Combining SUMIFS with "VLOOKUP alternative" which should return multiple matches

Davidovic

New Member
Joined
Apr 15, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a log containing time entries from employees. This log does not contain their position (Developer, Project Manager, QA Engineer).
However, I need to provide a report based on the positions. There are multiple Developers and multiple QA Engineers. What I am trying to get in cell I3 is ALL billable hours for ALL Developers.

In the screenshot you can see an example of this setup and what I'm trying to do:

2020-04-15_12h29_43.png


On the left is the log containing Employee's names and logged hours. Then I have a lookup table to get the Position matching the Employee's name. On the right I have my report where I'm trying to do something like this:

=SUMIFS(log_hours;log_billable;1;VLOOKUP(log_employee;lookup_employee_position;2;0);H3)
  • log_hours are the hours to be summed
  • log_billable must be 1, because I only want the billable hours
  • log_employee contains the employee's name. Here is where I'm stuck. I use the employee's name to lookup the position, and that needs to match the position in the report. In the popup window, it actually looks OK, because both the "Criteria_range2" and the "Criteria2" fields show "Developer", so that should be a match. However, when I press "OK", I get the following error:
    2020-04-15_12h33_56.png
What am I doing wrong? Can this work anyway? If not, what would be an alternative solution/formula?

Any help is appreciated!
 
The separator varies depending on location.
To include the date try
excel test.xlsx
ABCDEFGHIJKL
1loglookup_employee_positionreport
2employeehoursdatebillableemployeepositionlogged and billable hours per positionJanFebMar
3Adam5.0001/01/20201AdamDeveloperDeveloper586
4Bob2.0005/02/20201BobProject ManagerProject Manager023
5Claire6.0009/03/20201ClaireQA EngineerQA Engineer909
6Dave4.0027/01/20200DaveDeveloper
7Eric3.0013/03/20201EricQA Engineer
8Adam3.0026/02/20201
9Bob6.0008/01/20200
10Claire3.0001/01/20201
11Dave5.0005/02/20201
12Adam4.0009/03/20201
13Eric2.0027/01/20200
14Bob3.0013/03/20201
15Claire4.0026/02/20200
16Eric6.0008/01/20201
17Dave2.0013/03/20201
Sheet1 with DATE
Cell Formulas
RangeFormula
J3:L5J3=SUM(FILTER($B$3:$B$17,(ISNUMBER(MATCH($A$3:$A$17,FILTER($F$3:$F$7,$G$3:$G$7=$I3),0)))*($D$3:$D$17=1)*(TEXT($C$3:$C$17,"mmm")=J$2),0))


Once again changing the commas to semi colons.
If you are using a non-english version there is an excellent site here Translator that you can use to convert formulas to your own language.
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
See if this alternative formula works, or causes the same problems. Must be array confirmed with Ctrl Shift Enter, otherwise the results will be wrong (42 instead of 19 for the first row).

=SUMPRODUCT(SUMIFS(log_hours;log_billable;1;log_employee;IF($F$3:$F$7=H3;$E$3:$E$7)))

Thanks @jasonb75! While I did get the other suggested formula working after replacing the ',' with ';' , I actually prefer this one, because with the SUMIFS it's easy for me to add additional criteria for date ranges.

Helped me a lot!
 
Upvote 0

Forum statistics

Threads
1,215,785
Messages
6,126,887
Members
449,347
Latest member
Macro_learner

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top