ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Counting occurences of time it takes to calculate to 0 or just ove (https://www.excelbanter.com/new-users-excel/226858-counting-occurences-time-takes-calculate-0-just-ove.html)

Amy

Counting occurences of time it takes to calculate to 0 or just ove
 
I am using Excel 2003 and I would like to create a formula to perform the
following calculation.

Cell E1 = 100,000.00
Cell E2 = 20,021.88
I would like the formula in Cell E3

If you subtract E2 from E1, update E1 as you go along, how many times do you
have to do this to eventually make E1 = zero or a little more than zero?

Here is my example:

100,000.00 - 20,021.88 = 79,978.12 (Count = 1)
79,978.12 - 20,021.88 = 59,956.24 (Count = 2)
59,956.24 - 20,021.88 = 39,934.36 (Count = 3)
39,934.36 - 20,021.88 = 19,912.48 (Count = 4)
19,912.48 - 20,021.88 = -109.4

Therefore, the answer should be 4 in cell E3.

I understand how to do subtraction (E1 - E2), and I understand the basics of
IF statements. But how do I do subtraction and change the value of E1 as I
go along and keep track of another value named Count?

Thank you very much for your help.

Dave Peterson

Counting occurences of time it takes to calculate to 0 or just ove
 
You can divide the bigger number by the smaller number and take the integer
portion.

=e1/e2
and you get:
4.994535978

If you take just the integer portion:
=int(e1/e2)
you end up with 4.




Amy wrote:

I am using Excel 2003 and I would like to create a formula to perform the
following calculation.

Cell E1 = 100,000.00
Cell E2 = 20,021.88
I would like the formula in Cell E3

If you subtract E2 from E1, update E1 as you go along, how many times do you
have to do this to eventually make E1 = zero or a little more than zero?

Here is my example:

100,000.00 - 20,021.88 = 79,978.12 (Count = 1)
79,978.12 - 20,021.88 = 59,956.24 (Count = 2)
59,956.24 - 20,021.88 = 39,934.36 (Count = 3)
39,934.36 - 20,021.88 = 19,912.48 (Count = 4)
19,912.48 - 20,021.88 = -109.4

Therefore, the answer should be 4 in cell E3.

I understand how to do subtraction (E1 - E2), and I understand the basics of
IF statements. But how do I do subtraction and change the value of E1 as I
go along and keep track of another value named Count?

Thank you very much for your help.


--

Dave Peterson

Amy

Thank you!
 
I was completely overthinking that. Very nice that you can take the integer
value in Excel. Thank you very much for the tip!

Much appreciated,
Amy


All times are GMT +1. The time now is 11:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com