redspanna
Well-known Member
- Joined
- Jul 27, 2005
- Messages
- 1,602
- Office Version
- 365
- Platform
- Windows
Hi all
So Column A holds long list of dates, Column B holds sales
What would the correct formula be to sum the Sales in Column B for the previous year, only up to the same date as current year?
I have tried something like, but I get a ZERO value
=SUMIF(Data!A2:A8000,"<="&YEAR(TODAY())-1,Data!B2:B8000)
The correct out put would be 1990 from above example as this is the total sales from 1FEB21 - 16FEB21
Thanks in advance
So Column A holds long list of dates, Column B holds sales
What would the correct formula be to sum the Sales in Column B for the previous year, only up to the same date as current year?
NDA.v2.xlsm | ||||
---|---|---|---|---|
A | B | |||
1 | DATE | SALES | ||
2 | 01-Feb-21 | |||
3 | 02-Feb-21 | 830 | ||
4 | 03-Feb-21 | 475 | ||
5 | 04-Feb-21 | |||
6 | 05-Feb-21 | 475 | ||
7 | 06-Feb-21 | |||
8 | 07-Feb-21 | |||
9 | 08-Feb-21 | |||
10 | 09-Feb-21 | |||
11 | 10-Feb-21 | |||
12 | 11-Feb-21 | |||
13 | 12-Feb-21 | |||
14 | 13-Feb-21 | |||
15 | 14-Feb-21 | |||
16 | 15-Feb-21 | |||
17 | 16-Feb-21 | 210 | ||
18 | 17-Feb-21 | |||
19 | 18-Feb-21 | 695 | ||
20 | 19-Feb-21 | |||
21 | 20-Feb-21 | |||
22 | 21-Feb-21 | |||
23 | 22-Feb-21 | |||
24 | 23-Feb-21 | 350 | ||
25 | 24-Feb-21 | 1165 | ||
26 | 25-Feb-21 | |||
27 | 26-Feb-21 | |||
28 | 27-Feb-21 | |||
29 | 28-Feb-21 | |||
30 | 01-Mar-21 | 2650 | ||
31 | 02-Mar-21 | 1170 | ||
32 | 03-Mar-21 | 4575 | ||
Data (2) |
I have tried something like, but I get a ZERO value
=SUMIF(Data!A2:A8000,"<="&YEAR(TODAY())-1,Data!B2:B8000)
The correct out put would be 1990 from above example as this is the total sales from 1FEB21 - 16FEB21
Thanks in advance