Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Defaulting a random number


Hi

I am developing an AFL football score calculator using the RAND
function.

Is there a function that can default a cell to "0" after a random
number has been created.

I use F9 to do the random number, is there a formula or funtion that I
can use to default that cell?

Any help is appreciated, thanks in advance.


--
Pozman
------------------------------------------------------------------------
Pozman's Profile: http://www.excelforum.com/member.php...o&userid=36928
View this thread: http://www.excelforum.com/showthread...hreadid=566384

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Defaulting a random number


Pozman Wrote:
Hi

I am developing an AFL football score calculator using the RAND
function.

Is there a function that can default a cell to "0" after a random
number has been created.

I use F9 to do the random number, is there a formula or funtion that I
can use to default that cell?

Any help is appreciated, thanks in advance.

Hi Pozman,

I assume you want the "0" in another cell?

Try something like this in cell B1

=IF(A10,0,"") if your random number is in A1, B1 will be 0, otherwise
nothing

Alter cell ref's to suit

Is this what you are looking for?

oldchippy


--
oldchippy
------------------------------------------------------------------------
oldchippy's Profile: http://www.excelforum.com/member.php...o&userid=19907
View this thread: http://www.excelforum.com/showthread...hreadid=566384

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Defaulting a random number


Hi Old Chippy

Sorry for the late reply and thanks for taking the time to help me
out.

What Im looking to create is a random sports calculator.

Say for example you wanted to make one for soccer. You would start by
putting two teams in then hitting F9 to produce a random score using
the RAND function.

Then if you wante to play again you would have another key/funtion that
would reset the scores to 0 - 0 in that same cell.

Then the process is repeated. It is a situation that is probably best
suited for something like visual basic, but I dont have it or know how
to use it. So I'd really like to be able to create it in exel.

If you can help anymore thats great and thanks heaps.

Cheers


--
Pozman
------------------------------------------------------------------------
Pozman's Profile: http://www.excelforum.com/member.php...o&userid=36928
View this thread: http://www.excelforum.com/showthread...hreadid=566384

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Defaulting a random number


OK

If I understand correctly, try something like this,

Record a marco – Tools Macro Record new macro

Macro1 Select store in this workbook, then OK

Click cell A1, input =RAND()
Click cell B1, input =RAND()

Stop marco recording

Now record macro2

Record a marco – Tools Macro Record new macro

Macro2 Select store in this workbook, then OK

Click cell A1, input 0
Click cell B1, input 0

Stop marco recording

Now - View Toolbars Forms

Click on the "button" icon and draw one on your spreadsheet (Button 1),
the Assign macro box opens – select Macro1 OK

Now do the same for Macro2

Click button 1 for random numbers
Click button 2 for 0’s

oldchippy


--
oldchippy
------------------------------------------------------------------------
oldchippy's Profile: http://www.excelforum.com/member.php...o&userid=19907
View this thread: http://www.excelforum.com/showthread...hreadid=566384

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
same number appears in a random number generator Carmel Excel Worksheet Functions 4 May 28th 06 12:22 AM
Random Number generator Neil M Excel Worksheet Functions 2 February 1st 06 06:00 PM
Random letter and number generator Marie1uk Excel Worksheet Functions 4 January 23rd 06 06:04 PM
random number generation scotjo Excel Worksheet Functions 4 January 9th 06 04:06 PM
Random Number Questions Greegan Excel Worksheet Functions 1 January 5th 05 02:00 AM


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

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

About Us

"It's about Microsoft Excel"