Divide if celles contains number, but not if containing characters.

Kristoffer Lo
New Contributor


I have a spreadsheet with numbers or characters in A2->E2. They contain numbers from 0-5 and the character X. In want F2 to be the sum of A2->E2 if they contain numbers, divided by the amount of numbers.

So say that A2 is 2, B2 is X, C2 is 4, D2 is X and E2 is 1, I want the sum in F2 to to be A2+C2+E2 divided by 3, since it's only three cells (A2, C2 and E2) actually containing numbers.

Is this possible?

I've attached a screenshot that shows the spreadsheet.

2 Replies






That's as easy as can be. Thank you so much!