bo_danseuer
New Member
- Joined
- Oct 23, 2012
- Messages
- 8
- Office Version
- 365
- Platform
- MacOS
Hey Excel Junkies,
I have been trying to find a "sumproduct" solution (or any solution really) for a simple problem. I saw quite a number of postes on here with similar problems but not exactly my problem. Everyone wants to count something or other based on various criteria. I just want to count the number of unique dates for a certain range but cannot make it work.
I can successfully use sumproduct to calculate how many entries for example in Jan 2021 or to calculate how many VVI entries in 2020. Can anyone help me count the number of days an entry was made in a certain time frame ?
NB: This is part of a reporting process with various pivot tables and charts all connected to a slicer where the user can select his reporting month.
So there is a cell for "Report Month" = "Jan 2021"
I use the following formula to count (for example) how many "VVI" entries in the Report Month (RptMth) answer 2 for Mar 2020 based on the beginning date :
=SUMPRODUCT((INT(begin)>=(VALUE(rptMth)))*(INT(begin)<=EOMONTH(rptMth;0))*(type="VVI"))
Or to figure out the pay amount earned (the "pay" column is missing in the data) :
=SUMPRODUCT((INT(begin)>=(VALUE(rptMth)))*(INT(begin)<=EOMONTH(rptMth;0))*pay)
Can someone help me figure out how to count the unique number of days an entry was made?
For Jan 2021 the result should be 3 (4th, 5th and 6th Jan) ;
for March 2020 it's 2 (1st and 2nd Mar) .
Many thank (and a pint to the genius) who figures this out.
Cheers,
RvL
I have been trying to find a "sumproduct" solution (or any solution really) for a simple problem. I saw quite a number of postes on here with similar problems but not exactly my problem. Everyone wants to count something or other based on various criteria. I just want to count the number of unique dates for a certain range but cannot make it work.
I can successfully use sumproduct to calculate how many entries for example in Jan 2021 or to calculate how many VVI entries in 2020. Can anyone help me count the number of days an entry was made in a certain time frame ?
NB: This is part of a reporting process with various pivot tables and charts all connected to a slicer where the user can select his reporting month.
So there is a cell for "Report Month" = "Jan 2021"
I use the following formula to count (for example) how many "VVI" entries in the Report Month (RptMth) answer 2 for Mar 2020 based on the beginning date :
=SUMPRODUCT((INT(begin)>=(VALUE(rptMth)))*(INT(begin)<=EOMONTH(rptMth;0))*(type="VVI"))
Or to figure out the pay amount earned (the "pay" column is missing in the data) :
=SUMPRODUCT((INT(begin)>=(VALUE(rptMth)))*(INT(begin)<=EOMONTH(rptMth;0))*pay)
Can someone help me figure out how to count the unique number of days an entry was made?
For Jan 2021 the result should be 3 (4th, 5th and 6th Jan) ;
for March 2020 it's 2 (1st and 2nd Mar) .
Many thank (and a pint to the genius) who figures this out.
Cheers,
RvL
sumproduct play data.xlsx | |||||
---|---|---|---|---|---|
C | D | E | |||
1 | Begin | End | Type | ||
2 | 02 Mar 20 (00:00:00) | 01 Mar 21 (00:00:00) | VVI | ||
3 | 01 Mar 20 (09:20:00) | 04 Jan 21 (09:29:00) | PAR | ||
4 | 02 Mar 20 (00:00:00) | 01 Mar 21 (00:00:00) | VVI | ||
5 | 01 Mar 20 (09:20:00) | 04 Jan 21 (09:29:00) | PAR | ||
6 | 04 Jan 21 (11:11:00) | 04 Jan 21 (11:22:00) | PAR | ||
7 | 04 Jan 21 (11:28:00) | 04 Jan 21 (11:31:00) | PAR | ||
8 | 04 Jan 21 (12:38:00) | 04 Jan 21 (12:54:00) | PAR | ||
9 | 04 Jan 21 (17:04:00) | 04 Jan 21 (17:05:00) | PAR | ||
10 | 04 Jan 21 (17:07:00) | 04 Jan 21 (17:09:00) | PAR | ||
11 | 04 Jan 21 (17:12:00) | 04 Jan 21 (17:43:00) | PAR | ||
12 | 04 Jan 21 (17:48:00) | 04 Jan 21 (18:26:00) | PAR | ||
13 | 04 Jan 21 (18:27:00) | 04 Jan 21 (18:31:00) | PAR | ||
14 | 04 Jan 21 (18:42:00) | 04 Jan 21 (19:15:00) | PAR | ||
15 | 04 Jan 21 (19:33:00) | 04 Jan 21 (19:40:00) | PAR | ||
16 | 04 Jan 21 (19:42:00) | 04 Jan 21 (19:49:00) | PAR | ||
17 | 04 Jan 21 (19:50:00) | 04 Jan 21 (20:06:00) | PAR | ||
18 | 04 Jan 21 (20:06:00) | 04 Jan 21 (20:10:00) | PAR | ||
19 | 04 Jan 21 (20:10:00) | 04 Jan 21 (20:44:00) | PAR | ||
20 | 04 Jan 21 (20:50:00) | 04 Jan 21 (20:56:00) | PAR | ||
21 | 04 Jan 21 (21:00:00) | 04 Jan 21 (21:05:00) | PAR | ||
22 | 05 Jan 21 (09:06:00) | 05 Jan 21 (09:17:00) | PAR | ||
23 | 05 Jan 21 (11:53:00) | 05 Jan 21 (11:54:00) | PAR | ||
24 | 05 Jan 21 (12:05:00) | 05 Jan 21 (12:57:00) | PAR | ||
25 | 05 Jan 21 (16:28:00) | 05 Jan 21 (16:29:00) | PAR | ||
26 | 05 Jan 21 (16:32:00) | 05 Jan 21 (17:13:00) | PAR | ||
27 | 05 Jan 21 (17:40:00) | 05 Jan 21 (17:54:00) | PAR | ||
28 | 05 Jan 21 (17:59:00) | 05 Jan 21 (18:51:00) | PAR | ||
29 | 05 Jan 21 (19:04:00) | 05 Jan 21 (19:06:00) | PAR | ||
30 | 05 Jan 21 (19:14:00) | 05 Jan 21 (19:15:00) | PAR | ||
31 | 05 Jan 21 (19:22:00) | 05 Jan 21 (19:30:00) | PAR | ||
32 | 05 Jan 21 (19:33:00) | 05 Jan 21 (19:37:00) | PAR | ||
33 | 05 Jan 21 (19:41:00) | 05 Jan 21 (21:34:00) | PAR | ||
34 | 06 Jan 21 (09:47:00) | 06 Jan 21 (09:55:00) | PAR | ||
35 | 06 Jan 21 (10:55:00) | 06 Jan 21 (10:59:00) | PAR | ||
36 | 06 Jan 21 (11:17:00) | 06 Jan 21 (11:43:00) | PAR | ||
37 | 06 Jan 21 (15:40:00) | 06 Jan 21 (15:55:00) | PAR | ||
38 | 06 Jan 21 (16:06:00) | 06 Jan 21 (16:40:00) | PAR | ||
39 | 06 Jan 21 (16:41:00) | 06 Jan 21 (16:54:00) | PAR | ||
40 | 06 Jan 21 (16:56:00) | 06 Jan 21 (17:10:00) | PAR | ||
Sheet1 |