I think this depends what you want to sum. If F3 is a date in July do you just want to sum everything in June or would it depend on F3. Would you sum the invoice for 15th June if F3 was 31st July?
If you genuinely want to SUM everything between 0 and 30 days before F3 you could do that like this
=SUMPRODUCT(($A15:$A31>=F3-30)*($A15:$A31<=F3-0),$F15:$F31)
change 0 and 30 for other ranges
Bookmarks