A
A
Alina Shah2021-08-04 12:08:13
excel
Alina Shah, 2021-08-04 12:08:13

How to change the formula so that it subtracts a given number several times until it reaches the condition?

https://docs.google.com/spreadsheets/d/1kA10XbhcO7...
The task is as follows: It is
necessary to subtract 22 so many times until it is either LESS than 22 or EQUAL to 22.

Below, the formula, when 22 is reached, does not leave this result, and divides and it turns out zero, and this is not true.
Can the formula be changed to achieve the goal?

={
  ЕСЛИ(ИЛИ(--U3<10;--U3>22);REGEXEXTRACT("" & U3;"(\d)(\d)");{"" & U3\""})\
  ЕСЛИ(--U3>22; ОСТАТ(U3;22); "")
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Boev, 2021-08-04
@Shah_Alina

=ОСТАТ(число;22)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question