Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel rand() negative
When I run the equation =rand() sometimes I get a negative number, when I
should get a number between 0 and 1. Am I doing something wrong or is this a glitch? I am running excel 2003. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel rand() negative
Hi Rustin,
here and now not in a million times. Sub test099856() Dim lCnt As Long Randomize For lCnt = 1 To 1000000 If Rnd() < 0 Then Stop Next ' Further checking by looking ar the results For lCnt = 1 To 1000 Cells(lCnt, 1).Value = Rnd() Next End Sub -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel rand() negative
This was a bug in an early version of xl2003:
http://support.microsoft.com/kb/834520 The RAND function returns negative numbers in Excel 2003 http://support.microsoft.com/kb/828795/ Description of the RAND function in Excel 2003 But one of the service packs fixed it: http://support.microsoft.com/ph/2512?sid=202 Rustin wrote: When I run the equation =rand() sometimes I get a negative number, when I should get a number between 0 and 1. Am I doing something wrong or is this a glitch? I am running excel 2003. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
RAND() generates negative values??? | Excel Discussion (Misc queries) | |||
how can i set up rand or rand between to give only -1 or 1? | Excel Worksheet Functions | |||
I get some negative numbers when I use the RAND() function--Why? | Excel Worksheet Functions | |||
Excel 2003-RND() vs Rand() | Excel Programming | |||
Speed--Excel 2003 RAND vs. VBA Rnd... | Excel Programming |