![]() |
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 |
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 |
All times are GMT +1. The time now is 05:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com