Question about Loop until and print values

Antonow

New Member
Joined
Aug 19, 2015
Messages
39
Hi!

I´m doing a personal project, where it runs a randbetween values and print if it's >= 95%.

Here's an example

I have an Item. That has alues that can go min-max and an item that can change those values.
What i want is, for the excel to loop untill it hits a % of 93 or more and print how many times it used the item to calculate.
I've been using a code but it loops forever and don't print anything.

Cells
A1 A2 A4 A5 A7
[TABLE="width: 500"]
<tbody>[TR]
[TD]Min[/TD]
[TD]Max[/TD]
[TD][/TD]
[TD]Rand[/TD]
[TD]%[/TD]
[TD][/TD]
[TD]Nº uses[/TD]
[/TR]
[TR]
[TD]300[/TD]
[TD]400[/TD]
[TD][/TD]
[TD]=randbetween(300;400)[/TD]
[TD]calcs the % based in the max value( 400)[/TD]
[TD][/TD]
[TD]x total[/TD]
[/TR]
[TR]
[TD]130[/TD]
[TD]150[/TD]
[TD][/TD]
[TD]=randbetween(130;150)[/TD]
[TD]calcs the % based in the max value( 150)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]100[/TD]
[TD][/TD]
[TD]=randbetween(90;100)[/TD]
[TD]calcs the % based in the max value( 100)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]15[/TD]
[TD][/TD]
[TD]=randbetween(10;15)[/TD]
[TD]calcs the % based in the max value( 15)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



Looking forward for your help!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,914
Messages
6,175,351
Members
452,638
Latest member
Oluwabukunmi

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