Sahar Rabinoviz
Sahar Rabinoviz

Reputation: 1979

Count number of values that are being added

I have the following excel cell

=5+10+25

I want to count how many values I am adding, so for the about the result should be 3

I tried the answer here but it would only give me back 1 because it is applying the formula on 30 instead of =5+10+25.

Upvotes: 0

Views: 48

Answers (2)

Pankaj Jaju
Pankaj Jaju

Reputation: 5471

Try something like this

=(LEN(FORMULATEXT(A1))-LEN(SUBSTITUTE(FORMULATEXT(A1),"+","")))+1

Upvotes: 3

jkpieterse
jkpieterse

Reputation: 2956

=LEN(FORMULATEXT(A1)-SUBSTITUTE(FORMULATEXT(A1),"+","")+1

Upvotes: 0

Related Questions