Case sensitive sumproduct

Bering

Board Regular
Joined
Aug 22, 2018
Messages
186
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I have a problem with a formula in a staff holiday tracker.

The tracker has the employees names in Coloumn A, from row 6 to row 15.

Coloumns B-NI correspond to the days of the year: each employee enters the leave codes, as per the table below:

[TABLE="width: 172"]
<tbody>[TR]
[TD]Leave Name[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD]Sick Leave[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD]Holiday[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]Parental Leave[/TD]
[TD]P[/TD]
[/TR]
[TR]
[TD]Training[/TD]
[TD]T[/TD]
[/TR]
[TR]
[TD]Half Day[/TD]
[TD]h[/TD]
[/TR]
[TR]
[TD]Recuperation[/TD]
[TD]R[/TD]
[/TR]
[TR]
[TD]Business trip[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]Extraordinary[/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]


In range NL6 - NS15 I have the below formula to a summarise sick leaves, holidays and so on by employee, the headers in range NL5 - NS5 are: S H P T h R B X

SUMPRODUCT((OFFSET($A6,0,1,1,372)<>"")*(OFFSET($A$3,0,1,1,372))*((OFFSET($A6,0,1,1,372))=NP$5))


My problem is that, since the formula does not distinguish H from h, the count is incorrect in column NP (half days).

Is there a way to amend it to be case sensitive?

Many thanks

PS: cell A3 contains the number corresponding to the month (1 for Jan, 2 for Feb and so on)
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try:

=SUMPRODUCT((OFFSET($A6,0,1,1,372)<>"")*(OFFSET($A$3,0,1,1,372))*EXACT(OFFSET($A6,0,1,1,372),NP$5))
 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

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