The following dataset contains sales records of some products, their estimated delivery dates, and company selling regions. Using this dataset, we will demonstrate how to sum up sales values based on a specified region and date range.

We have used *Microsoft Excel 365* version here, you can use any other versions according to your convenience.

### Method 1: Using the SUMIFS Function to SUMIF between Two Dates with Another Criteria

**Steps**:

- Enter the following formula in cell
**E14:**

`=SUMIFS(E4:E11,C4:C11,">="&B14,C4:C11,"<="&C14,D4:D11,"East")`

Here, E4:E11 is the sales range, which values we want to sum, C4:C11 is the date range for the first criteria, “>=”&B14 is the first criteria, which means greater than or equal to the start date 1/10/2022. The second criteria range is similar to the first one, and the criteria for this range are “<=”&C14, which means less than or equal to the end date of 3/20/2022. The last criterion range is D4:D11, which contains the regions; the criteria for this range would be East.

- Press
**ENTER**.

You will get sales offor our defined date range with another criterion:*$13,806.00*.*East*Region

### Method 2: Using SUMIFS and EOMONTH to SUMIF between Two Dates

**Steps**:

- Enter the following formula in cell
**D14:**

`=SUMIFS(E4:E11,C4:C11,">="&B14,C4:C11,"<="&EOMONTH(B14,0),D4:D11,C14)`

Here, E4:E11 is the sales range, which values we want to sum, C4:C11 is the date range for the first criteria, “>=”&B14 is the first criteria, which means greater than or equal to the start date 1/1/2022. The second criteria range is similar to the first one, and the criteria for this range is **“<=”&EOMONTH(B14,0), **which means **less than or equal to **the end date of ** January **month,

*1/31/2022**,*and the last criteria range is

**D4:D11**containing the regions, the criteria for this range would be

**.**

*East*- Press
**ENTER**.

You will get the sum of sales, $6,835.00, for the dates of January month, with another criterion: South Region.

### Method 3: Using SUMIFS and DATE Functions to SUMIF between Two Dates

**Steps**:

- Enter the following formula in cell
**E14:**

`=SUMIFS(E4:E11,C4:C11,">="&DATE(2022,1,10),C4:C11,"<="&DATE(2022,3,20),D4:D11,D14)`

Here, **E4:E11 **is the sales range which values we want to sum, **C4:C11 **is the date range for the first and second criteria, and the last criteria range is **D4:D11 **containing the regions.

returns a number of a date value`DATE(2022,1,10)`

→

**Output →**44571

becomes`">="&DATE(2022,1,10)`

`">= 44571"`

returns a number of a date value`DATE(2022,3,20)`

→

**Output →**44640

becomes`"<="&DATE(2022,3,20)`

`"<= 44640"`

becomes`SUMIFS(E4:E11,C4:C11,">="&DATE(2022,1,10),C4:C11,"<="&DATE(2022,3,20),D4:D11,D14)`

checks if the date values of the range`SUMIFS(E4:E11,C4:C11,">= 44571",C4:C11,"<= 44640",D4:D11, “North”)`

→**C4:C11**are greater than or equal to**44571**and less than or equal to**44640**and the region**North**in the**D4:D11**range

**Output →**$9,496.00

- Press
**ENTER**.

You will get the sum of sales,for our defined date range with the other criteria:*$9,496.00,***North Region**.

### Method 4: Using the SUMIFS Function with TODAY

**Steps**:

- Enter the following formula in cell
**D14:**

`=SUMIFS(E4:E11,C4:C11,">="&B14,C4:C11,"<="&TODAY(),D4:D11,C14)`

Here, **E4:E11 **is the sales range which values we want to sum, **C4:C11 **is the date range for the first and second criteria, and the last criteria range is **D4:D11 **containing the regions.

becomes`">="&B14`

`">= 44562"`

returns today’s date`TODAY()`

→

**Output →**44643 (3/23/2022)

becomes`"<="&TODAY()`

`"<= 44643"`

becomes`SUMIFS(E4:E11,C4:C11,">="&DATE(2022,1,10),C4:C11,"<="&DATE(2022,3,20),D4:D11,D14)`

checks if the date values of the range`SUMIFS(E4:E11,C4:C11,">= 44562",C4:C11,"<= 44643",D4:D11, “East”)`

→**C4:C11**are greater than or equal to**44562**and less than or equal to**44643**and the region**East**in the**D4:D11**range

**Output →**$15,208.00

- Press
**ENTER**.

You will get the sum of sales, which is $15,208.00, between the first day of January 2022 and today’s date with criteria: East Region.

If you want to change the last date of the date range from today’s date to 10 days before today’s date, then use the following formula:

`=SUMIFS(E4:E11,C4:C11,">="&B14,C4:C11,"<="&TODAY()-10,D4:D11,C14)`

For the last date as a date 10 days following today’s date, enter the following formula:

`=SUMIFS(E4:E11,C4:C11,">="&B14,C4:C11,"<="&TODAY()+10,D4:D11,C14)`

### Method 5: Using a Combination of SUM and IF Functions to SUMIF between Two Dates

**Steps**:

- Enter the following formula in cell
**E14:**

`=SUM(IF((C4:C11)>=B14,IF((C4:C11)<=C14,IF(D4:D11=D14,E4:E11))))`

Here, **E4:E11 **is the sales range which values we want to sum, **C4:C11 **is the date range for the first and second criteria, and the last criteria range is **D4:D11 **containing the regions.

checks if the date values of the range`IF((C4:C11)>=B14`

→**C4:C11**are greater than or equal to the value of**B14**.

**Output →**`{FALSE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE}`

checks if the date values of the range`IF((C4:C11)<=C14`

→**C4:C11**are less than or equal to the value of**C14**.

**Output →**`{TRUE; TRUE; TRUE; TRUE; TRUE; FALSE; TRUE; FALSE}`

checks if the regions of the range`IF(D4:D11=D14,E4:E11)`

→**D4:D11**are equal to the regionof*East***C14**and returns

`({TRUE; TRUE; FALSE; TRUE; FALSE; FALSE; FALSE; FALSE}, E4:E11)`

**Output →**`{1402; 5935; FALSE; 7871; FALSE; FALSE; FALSE; FALSE}`

becomes`IF((C4:C11)>=B14,IF((C4:C11)<=C14,IF(D4:D11=D14,E4:E11)))`

→`{FALSE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE}`

`,`

`{TRUE; TRUE; TRUE; TRUE; TRUE; FALSE; TRUE; FALSE}`

`,`

`{1402; 5935; FALSE; 7871; FALSE; FALSE; FALSE; FALSE}`

→`{FALSE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE}, {1402; 5935; FALSE; 7871; FALSE; FALSE; FALSE; FALSE}`

**Output →**`{FALSE; 5935; FALSE; 7871; FALSE; FALSE; FALSE; FALSE}`

becomes`SUM(IF((C4:C11)>=B14,IF((C4:C11)<=C14,IF(D4:D11=D14,E4:E11))))`

`SUM({FALSE; 5935; FALSE; 7871; FALSE; FALSE; FALSE; FALSE})`

**Output →**$13,806.00

- Press
**ENTER**.

You will get the sum of sales,for our defined date range with other criteria:*$13,806.00***East Region**.

### Method 6: Using SUMPRODUCT, MONTH, and YEAR Functions

**Steps**:

- Enter the following formula in cell
**E14:**

`=SUMPRODUCT((MONTH(C4:C11)=1)*(YEAR(C4:C11)=2022)*(D4:D11=D14)*E4:E11)`

**E4:E11 **is the sales range which values we want to sum, **C4:C11 **is the date range for the first and second criteria, and the last criteria range is **D4:D11 **containing the regions.

returns the month number of the dates`MONTH(C4:C11)`

→ MONTH

**Output →**`{1;1;1;2;2;3;3;3}`

becomes`MONTH(C4:C11)=1`

`{1;1;1;2;2;3;3;3}=1`

**Output →**`{TRUE; TRUE; TRUE; FALSE; FALSE; FALSE; FALSE; FALSE}`

returns the year values of the dates`YEAR(C4:C11)`

→

**Output →**`{2022;2022;2022;2022;2022;2022;2022;2022}`

becomes`YEAR(C4:C11)=2022`

`{2022;2022;2022;2022;2022;2022;2022;2022}=2022`

**Output →**`{TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE}`

checks if the regions of the range`D4:D11=D14`

→**D4:D11**are equal to the regionof*East***C14**

**Output →**`{TRUE; TRUE; FALSE; TRUE; FALSE; FALSE; FALSE; FALSE}`

becomes`SUMPRODUCT((MONTH(C4:C11)=1)*(YEAR(C4:C11)=2022)*(D4:D11=D14)*E4:E11)`

→`SUMPRODUCT({TRUE; TRUE; TRUE; FALSE; FALSE; FALSE; FALSE; FALSE}*{TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE}*{TRUE; TRUE; FALSE; TRUE; FALSE; FALSE; FALSE; FALSE}*E4:E11)`

→`SUMPRODUCT({1;1;1;0;0;0;0;0}*{TRUE; TRUE; FALSE; TRUE; FALSE; FALSE; FALSE; FALSE}*E4:E11)`

→`SUMPRODUCT({1;1;0;0;0;0;0;0}*E4:E11) SUMPRODUCT({1402;5935;0;0;0;0;0;0})`

**Output →**$7,337.00

- Press
**ENTER**.

You will get the sum of sales,for*$7,337.00*month with another criterion:*January***East Region**.

### Method 7: Using a VBA Code to SUMIF between Two Dates

**Steps**:

- Go to the
**Developer**Tab >>**Visual Basic**Option.

The **Visual Basic Editor **will open up.

- Go to the
**Insert**Tab >>**Module**Option.

A **Module** will be created.

- Enter the following code:

```
Sub sumdatewithcriteria()
Cells(14, 5).Value = Application.WorksheetFunction.SumIfs(Range("E4:E11"), _
Range("C4:C11"), ">=" & DateValue("1/10/2022"), Range("C4:C11"), "<=" & _
DateValue("3/20/2022"), Range("D4:D11"), "East")
End Sub
```

We will get our value in cell **E14 **and **DATEVALUE** will convert the date string into a date value and then after fulfilling the criteria **SUMIFS **will return the added sales value in cell **E14**.

- Press
**F5**.

You will get sales offor our defined date range with another criterion:*$13,806.00*.*East*Region

**Read More:** How to Use SUMIFS with Date Range and Multiple Criteria

## Practice Section

For practicing by yourself, we have provided a Practice section, like the one below, on a sheet named **Practice**.

**Download the Workbook**

**<< Go Back to SUMIFS with Date Range | Excel SUMIFS Function | Excel Functions | Learn Excel**