generate random #'s, output in consecutive cells. Input box,Randbetween() function, "For.. Next" construct

Jessica1981

New Member
Joined
Aug 19, 2009
Messages
13
Guys you could save my life! - that is ... if you can help me with this question :) Really appreciate it if you could, here it is..

Write a subroutine RndInt() that generate n random integers and output them one by one to consecutive cells in any empty column in the worksheet. Use an “Inputbox” to prompt the user to enter how many numbers to generate (i.e. the value of n). Each random integer should lie between 1 and 100. Value in the previous cell is added to the new integer before the new value is output (e.g. if value in the previous cell is 5 and the random current number is 4, the output value is 9). After the number generation process, calculate the average of those generated numbers. (Hint: Use Randbetween(), Average() functions in Excel and ‘For...Next’ construct.)
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Oh my goodness! lol - looks like some of my friends are getting help from this site! - it is a great help - thank you!!! :)
 
Upvote 0

Forum statistics

Threads
1,216,125
Messages
6,128,999
Members
449,480
Latest member
yesitisasport

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