Question about Microsoft Excel for PC

1 Answer

Random number generation.

Good day

Im having problems with randome number generation( =rand() ), i need to limit the numerical spaces that is recieved to a number of 5 spaces.
Currently ill run the formula as.{ =rand()*100000 }.

(Note i multiply it with 100000 to ensure that i do not get a , in between the number.)

How do they i limit the Numerical Spaces delivered thru this formula to me. Please help.

I am aiming to use this in printing, to genarate a "lotoery" type of ticket.

Posted by on

  • Jovan Bester Jul 15, 2008

    Thank you for the help, but still it seems to give me a number some times that is less then 5 digits.

    I have now grabed a code of a site that allows me to put limitations on, to select a number range i want random numbers from.

    Like lets say 2000 and 3000, now i need to select 500 random numbers in between these to numbers and also. With this i can, i can also be sure that there is no doubles, and also control the amount of numerical spaces i want it on.

  • Jovan Bester Jul 15, 2008

    Thank you, but It still seems to generate a number sometimes that is less then 5 numerical values.

    Luckily i grabed some VB code of the net that allos me to generate none repeating numbers, with a garunteed 5 numerical value.

    It also gives me the option of limiting where i would like to generate the numbers from and to.

    Thank you again for the help


1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points


    An expert that gotĀ 5 achievements.


    An expert who has posted more than 50 answers, of which 90% or more were rated as helpful.


    An expert whose answer gotĀ voted for 20 times.

  • Expert
  • 53 Answers

You can use the Round function as below - it rounds out the decimal to 0 places, which gives you 5 digits with no commas


Posted on Jul 15, 2008

Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

1 Answer

Wants to give random page number in ms word

Not too sure whether your comment above is the problem or what you want to do.

Do you want to insert a page number, then put in non word doc pages, then have the next page in your word document numbered appropriately? If so, you need to insert a section break at the end of the page where you are going to put in pages, then make sure the page layout for the second section does not have "different first page" turned on. Now break any link between section 2 and section 1 in the page layout. So click off the "same as previous" icon in the footer in section 2. Then insert a new page number and set it to "start at" the page number you need it to be.

If you need several sections like this then just repeat the process.

Remember that if you delete a section break, then all the page formatting will revert to that in the previous section. Horrible but its what Word does. Go to the end of any document with sections and add one section break at the end of your text with the same page formatting as you want through the pages before you remove any section breaks in the document to avoid this.

There is a really good e-newsletter on Office issues, Woody's Office Watch; if you use Office a lot but find some features difficult to master, you'll love WOW, very helpful.

Sep 26, 2011 | Microsoft Office Professional 2007 Full...

1 Answer

Good day! sir/madam..where can i find the line spacing? i need it because i want to create a concept map and my teacher wants that it's line spacing is double spacing. how and where can i find it? thank...

Go to the Home ribbon, then to paragraph.
There should be a small arrow shaped figure in the bottom right corner of the paragraph area.
Click that and change the line spacing to double spaced.

Mar 05, 2011 | Microsoft Office Professional 2007 Full...

1 Answer

Once i downloaded and installed CA 2010 Security Suite my internet will not work. the diagnostic tool in IE says internet connection is fine but can't connect to any site. unistalled program and IE is...

you can fix this problem through this way
1. Edit the Host File (all the steps explained below) (check if you are able to connect to internet in safe mode with networking ...if not proceed to 2nd step)
2. Change Proxy Settings (if you're still unable to connect to net)
Reimage works by comparing each and every OS system files with the correct files from a web repository of 25 million Windows components. (since Reimage works by comparing with correct file, it can easily find the hiding rootkit, infact this is what a rootkit remover do......dumps a list of files from your hard disk drive and compares it with the list from the recovery console in order to find a hiding virus) This is the sole reason you can get a PC as good as new once you run Reimage, all other antivirus and antimalware programs just delete the virus....but they don't correct the damage...which results in re-infection and slow performing PC.
Reimage first scans your computer thoroughly; all the files, folders, registry keys and values, drivers, softwares, stacks and then either repair or remove those stuffs that should be there. But it's not just that it does. They have an enormous web repository of application, drivers, system objects, etc. from where they compare your PC's files and if corrupted replace it with the healthy ones.
The problem here is Security Suite virus changed the HOSTS File, or changed Proxy Settings.
1. Mend Hosts file: The HOSTS file is used to translate a host name to an IP (Internet Protocol) address without querying the DNS (Domain Name System) server. In general if you know the host name of the machine that serves the unwanted content, you can redirect it to, which is the local IP address of your machine.
For example, assume you have redirected the ad server to Every time your browser tries to load an image or a flash animation from the ad server, it will be redirected to your machine instead.
As a result, the browser will not be able to show any content from this ad server. The same message appears when a web site is unavailable for other reasons that HOSTS file blocking. The HOSTS file is named 'hosts' and editable with any text editor, such as Notepad or Wordpad.
The file generally appears at: •'C:\Windows\System32\Drivers\Etc\hosts' on Windows XP
Before editing, backup the current HOSTS file. You need to delete all the lines from this hosts file except " localhost".
The other entires you saw there need to be removed as they are malicious. (This is why IE unable to connect, because the HOSTS file block the huge list of websites...and you get a warning that "The Page cannot be displayed") After removing the entries from hosts file, please save this file and close it. Now you should be able to search on Google. If not,
2. Change Proxy Settings: Start your PC in safe mode with networking, If you can`t run the IE, then you should repair the proxy settings of Internet Explorer. Run Internet Explorer, Click Tools -> Internet Options. Select Connections Tab and click to Lan Settings button. Uncheck "Use a proxy server" box. Click OK. Click Apply. Click OK. And go to to run a Scan.
But one of my subscriber mailed this " But after I unchecked use a proxy server, and then ok, Apply was not an option to click. Another idea?"
So am giving you more options...
1. Run Internet Explorer, Click Tools -> Internet Options
2. Select Connections Tab and click to Lan Settings button
3. Click Advanced button to open Proxy settings. Copy and paste the following text into "Do not use proxy server for addresses beginning with:";;; (whatever list of web address you would like to use)
4. Click OK to save Proxy settings, then Click OK to close Lan Settings and Click OK to close Internet Explorer settings. (Now you should be able to click 'ok')
5. Download HijackThis. NOTE: before saving it onto your computer rename HijackThis.exe to iexplore.exe
6. Double click renamed iexplore.exe. Then click "Do a system scan only" button and look for similar entries in the scan results as shown below:
R1 – HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings,ProxyServer = http=
O4 – HKLM\..\Run: [{RANDOM}] C:\Documents and Settings\Username\Local Settings\Application Data\{RANDOM}\{RANDOM}shdw.exe
O4 – HKCU\..\Run: [{RANDOM}] C:\Documents and Settings\Username\Local Settings\Application Data\{RANDOM}\{RANDOM}shdw.exe
7. Once you have selected all entries, close all running programs then click once on the "Fix checked" button. Close HijackThis.
8. Go to and run a scan

Sep 11, 2010 | Computer Associates CA Internet Security...

1 Answer

I get sending error 0x800ccc80 when trying to send messages...But all messages are send once or twice a day at random times...otherwise they sit in the outbox

Outlook 2007 is stricter than 2003 about SMTP authentication. It could be the case that 2003 tried automatically to connect without authentication when authentication failed, while 2007 throws an error.

Please verify the settings for authentication in your account, and uncheck the box “My outgoing server (SMTP) requires authentication", on the "Outgoing Server" tab.

Mar 18, 2010 | Microsoft Office Professional 2007 Full...

2 Answers

Product key

Product keys come with the software when you purchase it. Usually it is located inside the sleeve the disc comes in or somewhere on it. They are generally several groups of random numbers and letters. If you have lost or misplaced your product key a new one can be obtained from microsoft for a nominal fee.

Mar 05, 2009 | Microsoft Office Professional 2007 Full...

1 Answer

Random selection formaula

enumerate your list from 1 to 5000

Nov 25, 2008 | Microsoft Business & Productivity Software

3 Answers

Outlook 2007 - Emails sticking in outbox.

Hello, wmoore78! Apparently, for some reason, the initial issues posed in chat sessions have been placed in the forum by FixYa. While this is not necessary in our case, as we resolved your issues, it does allow me to communicate further with you. Please take a moment to look at the comment I posted pursuant to our chat session. I have included a great deal of additional reference material for you to keep on hand, which you may find of assistance in the future.

As I haven't seen either here in the open forum, or in response to the chat, any indication that your email did not successfully transmit, I am glad to know that we were successful in solving your initial problem (and a few others along the way)! Additionally, if you could take a moment to indicate that your problem was resolved at a FixYa level by rating this and the chat, I would certainly appreciate it. These ratings are the essential means by which we as experts are ranked and permitted to continue to help others through the FixYa forum. Rating this solution will also close it, to let other experts know that the issue has been resolved and they need not focus attention on attempting to find possible solutions for you. Thank you again, and please do not hesitate to post back through a comment if there is anything further with which I may be of assistance.


Sep 09, 2008 | Microsoft Office Professional 2007 Full...

1 Answer

Microsoft Office 2007

The Product number for Microsoft office pro 2007

Apr 08, 2008 | Microsoft Office Standard for PC

Not finding what you are looking for?
Microsoft Excel for PC Logo

71 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Business & Productivity Software Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18304 Answers


Level 3 Expert

2598 Answers

Are you a Microsoft Business and Productivity Software Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides