Column A is dates in order spanning several years, column B are numbers.
I need the sum of the last number minus the first number for each month and year.
I can set the month/year condition with this:
=SUM(IF(MONTH($A:$A)=9,IF(YEAR($A:$A)=2014,
But I do not know how to find the last and first numbers.
When I use LOOKUP(9E+307,B:B) with above [in an array] it does not return the correct last number for that month.
What I need is:
For month and year, last number minus first number
or
=SUM(IF(MONTH($A:$A)=9,IF(YEAR($A:$A)=2014, last number in column [or last date entered] for that month/year minus first number in column [or first date entered] for that month/year.