# JOIN and SUM

I have this situation

```ROW 1: BUS 101 | [need the formula]
ROW 2: BUS 101 |  \$1,000
ROW 3: BUS 101 |  \$1,000
```

In the cell where I need a formula, I want to have Smarsheet look at rows (always below, but it may be 2, 3 or even 4 rows) that have the same code (BUS 101) in one column and add the amounts.

So, the [need the formula] would show \$2,000.

```ROW 1: BUS 101 | [need the formula]
ROW 2: BUS 101 |  \$1,000
ROW 3: BUS 101 |  \$1,000
ROW 4: BUS 101 |  \$2,000
```

In this example, the [need the formula] would show \$4,000.

• ✭✭✭✭✭✭

Hope you are fine, please try the following formula:

```=SUMIFS(Sum:Sum, Code:Code, Code@row)
```

the following screenshot shows the result:

bassam.khalil2009@gmail.com

• What if BUS 101 isn't always in the first column?

BUS 101 | (need formula)

BUS 101 | \$1,000

BUS 101 | \$1,500

CAR 243 | \$4,500

CAR 243 | \$1,500

CAR 243 | \$3,000

ECO 433 | \$,5000

ECO 433 | \$5,000

• ✭✭✭✭✭✭

Please add a copy of your sheet after removing any sensitive data and show me what you need exactly.

Also you can do it by creating a report and group it by the code and use the sum by cost in this report.

bassam.khalil2009@gmail.com