# In Excel, add 1 if not number, or else add the number

In excel, how do I write a formula that does the following:

In a certain cell range, if the cell contains a non-numeric entry, add one, or else add the number the cell contains.

for example

4 xyz def bc 2 0

=9

or

1 ab cd 2 af

=6

## Answers

Contents of the data A1:A6

4 xyz x 2 y 0

Write the following formula in cell B1

=SUM(A1:A6)+(COUNTA(A1:A6)-COUNT(A1:A6))