Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default random integer problem.


Hi,
I am trying to generate a random integer between say 0 and 4 in
particular cell(1,5).Then I am trying to say(in cell 1,6) with an I
argument,if this value(in cell 1,5) is greater than value in anothe
cell(2,5) make the value of cell (1,6)=3.I keep getting weird result
that don't make sense.Any help please would be appreciated.
Many Thanks,
Mark:

--
mark_varney4
-----------------------------------------------------------------------
mark_varney47's Profile: http://www.excelforum.com/member.php...info&userid=33
View this thread: http://www.excelforum.com/showthread.php?threadid=49106

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default random integer problem.

using VBA I use the following function

Public Function RandomNumber(ByVal minX As Integer, ByVal maxX As
Integer) As Integer

Randomize
RandomNumber = Int((maxX - minX) * Rnd()) + minX

End Function

Reply
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
random integer with sum constraint Karin[_2_] Excel Worksheet Functions 8 January 6th 10 09:13 PM
How do I add an integer to an existing integer? Aaron Excel Worksheet Functions 3 December 17th 09 09:46 PM
Random Integer Don[_4_] New Users to Excel 3 September 20th 09 11:08 PM
Problem with Solver and Integer constraints [email protected] Excel Worksheet Functions 1 August 12th 05 03:23 AM
linerar/integer programming problem ben h Excel Programming 3 December 22nd 03 12:46 PM


All times are GMT +1. The time now is 10:36 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"