Please enable JavaScript to view the comments powered by Disqus.


SUM(...(...A2:A13>=EOMONTH(...F1,-2)+1)*(...A2:A13<=(...EOMONTH(...F1,-2)+DAY(...F2)))*1)

Counting an item for same dates but for last month

The formula starts by getting the start date with EOMONTH that find the last corresponding month and DATE is used to get to the same date. The corresponding array of values is then summed up to give the count.


Used Functions

Category: Math and trigonometry

Adds its arguments

Syntax

SUM(number1,[number2],...)

Category: Date and time

Returns the serial number of the last day of the month before or after a specified number of months

Syntax

EOMONTH(start_date, months)

Category: Date and time

Converts a serial number to a day of the month

Syntax

DAY(serial_number)

Lets chat on this