LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Creating a table based on user input

Hi Forum,

As always I would be very grateful if anyone can help with writing some
Excel VBA code that would allow me to complete the following task;

I have 2 input boxes that prompt the user to specify the value of two
variables (x = the required number of columns & y = the required number of
rows for a table of data. I would then like to create a loop to compile a x
by y size table with each cell having a random value in it where the range of
random numbers is between 1 and the total number of cells. I am really new to
VBA but have been told the code would involve the statement
ActiveCell.FormulaR1C1 = Int((TOTAL NUMBER OF CELLS * Rnd) + 1) but I am
struggling to make it work. I'd be really appreciative if anyone is willing
to take the time to help with the code for this loop.

Best wishes
Matt




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table data based on user input Maver1ck666 Excel Programming 0 February 21st 08 10:33 AM
Creating Input box that grap data based on user answer salooha[_4_] Excel Programming 1 February 1st 06 11:30 PM
Creating a Directory from a user input Ron de Bruin Excel Programming 4 July 13th 04 09:19 PM
Help creating link & formula from user input bturner2 Excel Programming 2 June 9th 04 07:19 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"