A
A
Alina Shah2020-04-23 03:40:31
Google Sheets
Alina Shah, 2020-04-23 03:40:31

How to count the number of zeros in a set of digits?

There is a set of numbers, you need to count the number of zeros. They may, of course, not be.
10091976336314
In this case, there are two zeros and at the output you need to see the result written in the text in the feminine gender:
two.
Link to the table:
https://docs.google.com/spreadsheets/d/1vqKnsN_8qQ... The
result is also important, how many digits except zeros.
In this example, the result is:
12
It is possible to calculate one thing first, and then another by subtraction. The order is not important to me, the main thing is to get "two" and "12" from this example.
Is such a problem solved?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2020-04-23
@Shah_Alina

You can use LEN and regular expressions to count the number of digits.
=LEN(REGEXREPLACE(TO_TEXT(A10);"[^1-9]";""))
To display zeros, the same thing.
=LEN(REGEXREPLACE(TO_TEXT(A10);"[^0]";""))
To write the number of zeros in words, you need the NUMBERTEXT extension

=NUMBERTEXT("cardinal-feminine "& LEN(REGEXREPLACE(TO_TEXT(A10);"[^0]";"")))

5ea0f930c768d543174740.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question