How to sum up the values of the working schedule symbols from a range that matching the value legend for these characters

Roumen Roussev

New Member
Joined
Nov 21, 2018
Messages
6
I have a shift schedule with symbol and legend with duration value of each shift symbol. I want to summarize the value corresponding to the symbols for each employee.

Now I use:
=COUNTIF($D5:$AH5;$A$13)*($N$13*24)+COUNTIF(D5:AH5;$A$14)*($N$14*24)+COUNTIF(D5:AH5;$A$15)*($N$15*24)
where
D5:AH5 is range with shift symbols
A13:A15 is range for symbols fom legend
N13:N15 is range of corresponding symbols value with "hh:mm" formatting
Image: https://ibb.co/WpQfQyY

This is the WeTransfer link to an Excel file. https://we.tl/t-eyGTJAH9KB
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,317
Office Version
365
Platform
Windows
Hi & welcome to MrExcel.
You could use
=SUMPRODUCT((D5:AH5=A13:A34)*(N13:N34))*24
but for it to work you will need to remove the merged cells A17:A18
you will also need a value of 0 in col N rather than ""
 

Roumen Roussev

New Member
Joined
Nov 21, 2018
Messages
6
Hi & welcome to MrExcel.
You could use
=SUMPRODUCT((D5:AH5=A13:A34)*(N13:N34))*24
but for it to work you will need to remove the merged cells A17:A18
you will also need a value of 0 in col N rather than ""
Thank you very much. The solution works perfectly without merged cells .
 

Roumen Roussev

New Member
Joined
Nov 21, 2018
Messages
6
I do not know whether it's right to continue the topic, but I'm faced with another problem in the formula.
I need to use the formula so as to summarize only if another condition for comparison is fulfilled in the second range. I have identical symbols that differ only by criteria in another column
I tried:
=SUMPRODUCT((AND((D5:AH5=$A$35:$A$63);(A5=$C$35:$C$63))*($N$35:$N$63))*24)
But it doesn't work.
This is WeTransfer link to an Excel file. https://we.tl/t-acRK0YoCGO
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,317
Office Version
365
Platform
Windows
Try
=SUMPRODUCT(((D5:AH5=$A$35:$A$63)*(A5=$C$35:$C$63)*($N$35:$N$63))*24)
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,317
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Forum statistics

Threads
1,082,317
Messages
5,364,512
Members
400,804
Latest member
davileal

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top