I have dates in the range A8:A250 with values in range B8:B250. What I would like to be able to do is sum the values that fall in the last "N" number of calendar days. The dates are in order from earliest down the column to lastest. Every day is not entered so the sum may be for only 5 days total because those were the only dates that fall in the last "N" number of days and have value. Is this posible with a formula not using VBA? I tried the ones below with no results. U42 is the "N" number.
=SUMIF(A8:A250,">= MAX(A8:A250)-U42+1",B8:B250)
=SUMIF(A8:A250,">= A2",B8:B250) and putting = MAX(A8:A250)-U42+1 in cell A2
=SUMIFS(B8:B250,A8:A250,">= MAX(A8:A250)-U42+1")
=SUMIFS(B8:B250,A8:A250,">= A2") and putting = MAX(A8:A250)-U42+1 in cell A2
=SUMIF(A8:A250,">= MAX(A8:A250)-U42+1",B8:B250)
=SUMIF(A8:A250,">= A2",B8:B250) and putting = MAX(A8:A250)-U42+1 in cell A2
=SUMIFS(B8:B250,A8:A250,">= MAX(A8:A250)-U42+1")
=SUMIFS(B8:B250,A8:A250,">= A2") and putting = MAX(A8:A250)-U42+1 in cell A2