You can do this with an array formula

```
=SUM((LEFT($A$2:$A$8,2)="1a")*(IF(ISNUMBER(--RIGHT($A$2:$A$8,LEN($A$2:$A$8)-2)),RIGHT($A$2:$A$8,LEN($A$2:$A$8)-2),0)))
```

Because this is an array formula you need to use `Control`+`Shift`+`Enter` instead of just `Enter`.

Additionally since its an array formula, you want to avoid full column references such as `A:A`

You will know you have entered it correctly when you see { } around your formula. Note the { } may not be added manually.

### UPDATE

If you want to make the formula a bit more robust to deal with longer search strings such as 22a, and allow you to use a cell for the ID string you want to sum by, you can use the following formula.

```
=SUM((LEFT($A$1:$A$8,LEN(TRIM(C2)))=C2)*(IF(ISNUMBER(--RIGHT($A$1:$A$8,LEN($A$1:$A$8)-LEN(C2))),RIGHT($A$1:$A$8,LEN($A$1:$A$8)-LEN(C2)),0)))
```

Note this is still an array formula. Also the range has been increase to include the data value of a single digit after your key that you are searching for.

minor update, changed the `-RIGHT`

to `--RIGHT`

...but apparently the -- may not even be needed.