Dynamic Arrays - Count Days

Leticia

New Member
Joined
Jun 9, 2021
Messages
45
Office Version
  1. 365
Platform
  1. Windows
Hi!! I am traying to sum all the days that has elapsed between the origin date and a fixed given date when some conditions happen to occur.
I copy below a sample.

DATE (A)SOLUTION (B)
05/05/202110/05/2021
10/05/202110/07/2021
20/05/202120/07/2021
20/05/202130/05/2021
25/05/2021

31/05/2021 (D1)
Days
#VALUE!​

The error I have obtained is from the following formula
=SUM(FILTER(DAYS($D$1;$A:$A);(A2:A77<=D1)*((B2:B77>=D1)+(B2:B77=""))))

I cannot create a complementary column counting the days when this occurs, because of the database I am working with.

Thank you so much!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about
Excel Formula:
=SUM(FILTER(DAYS($D$1,$A2:$A77),(A2:A77<>"")*(A2:A77<=D1)*((B2:B77>=D1)+(B2:B77=""))))
 
Upvote 0
Solution
How about
Excel Formula:
=SUM(FILTER(DAYS($D$1,$A2:$A77),(A2:A77<>"")*(A2:A77<=D1)*((B2:B77>=D1)+(B2:B77=""))))
Thank you! I worked!
Also do you know why when I do EDATE(28/02/2021;-1) it gives me back 28/01/2021, instead of 31/01/2021?
 
Upvote 0
It's because 28-Jan is one month before 28-Feb
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

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