Well, you could use another worksheet that contains a column of hours, and next to each hour you would use a formula with the `SUMIF()`

function.

Assuming the hours in your above table are in column **A** with the sales in column **B**, the formula would look something like this:

*In this illustration, the data that contains your above table is in the sheet called *`RawData`

.

```
=SUMIF(RawData!A:A,A1,RawData!B:B)
```

```
+----------------------------------------------+
| Hour | Sum |
+------+---------------------------------------+
| 7 | =SUMIF(RawData!A:A, A1, RawData!B:B) |
+------+---------------------------------------+
| 8 | =SUMIF(RawData!A:A, A2, RawData!B:B) |
+------+---------------------------------------+
| 9 | =SUMIF(RawData!A:A, A3, RawData!B:B) |
+------+---------------------------------------+
```

Which would show the output as:

```
+--------------+
| Hour | Sum |
+------+-------+
| 7 | 5 |
+------+-------+
| 8 | 15 |
+------+-------+
| 9 | 16 |
+------+-------+
```

*Breaking Down the Formula*

The formula has three parts:

**Range** *is the range of cells you want evaluated*.

In this case, it will be **Your** first column you provided in your question, which I assumed to be Column A (on our theoretical sheet `RawData`

).

**Criteria** *is the condition or criteria in the form of a number, expression, or text that defines which cells will be added*

In this case, it's the hours within the **Range** we provided earlier. On our separate sheet we created, we typed out 7, 8, 9 as you see in my example. We will reference those cells to be our Criteria.

**Sum_range** *are the actual cells to sum.*

In your case this will be **Your** column B that you provided in your question on the sheet `RawData`

. These are the numbers that are actually added.