iteration problem

pinkdev

New Member
Joined
Sep 11, 2011
Messages
1
Hi everyone
I have a complicated problem but it is difficult to show it all. I wrote another simpler one which has similar principle. Bascially, I need to know how to use excel to complete the iteration below automatically. Please help.
Let a, b be 2 real numbers.
a*b=100
While a has to follow the conditions below:
a=1 for 0<b<2
a=10/b for 2<b<20
a=2 for b>20
1st iteration: let b=10 at first (ignore the conditions first), a=100/10=10
2nd iteration: b=10, 2<b<20, a=10/b=10/10=1
3rd iteration: a=1, b=100/a=100, a=2, b=50
4th iteration: a=2, b=50
The value of a and b finally becomes constant.

What I want is to complete the iteration in one step or one button instead of showing the values of a and b everytime, since in my real problem, there is more than 1000 iteration.
Could anyone help me to solve the problem?
Thank you very much!!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top