Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tracker
 
Posts: n/a
Default random# btw 1-9 without 6

im trying to use rand() or randbetween to get a random number btwn 1 and 9
but excluding 6 as a posibility. is it possible?
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Assuming this is a different question than your other thread (please
keep questions in the same thread if possible - it reduces the chance
that people will waste time suggesting answers that have already been
offered), here's one way, using 2 cells (it's actually the same way, of
course):

A1: =RANDBETWEEN(1,8)
A2: =A1+(A1=6)



In article ,
"Tracker" wrote:

im trying to use rand() or randbetween to get a random number btwn 1 and 9
but excluding 6 as a posibility. is it possible?

  #3   Report Post  
Michael
 
Posts: n/a
Default

Hi Tracker
Maybe you could also consider this option.
=IF(RANDBETWEEN(1,9)=6,"",RANDBETWEEN(1,9))

HTH
Michael Mitchelson


"JE McGimpsey" wrote:

Assuming this is a different question than your other thread (please
keep questions in the same thread if possible - it reduces the chance
that people will waste time suggesting answers that have already been
offered), here's one way, using 2 cells (it's actually the same way, of
course):

A1: =RANDBETWEEN(1,8)
A2: =A1+(A1=6)



In article ,
"Tracker" wrote:

im trying to use rand() or randbetween to get a random number btwn 1 and 9
but excluding 6 as a posibility. is it possible?


  #4   Report Post  
Ron Coderre
 
Posts: n/a
Default

Try this:

=CHOOSE(RANDBETWEEN(1,8),1,2,3,4,5,7,8,9)

Does that help?
--
Regards,
Ron


"Tracker" wrote:

im trying to use rand() or randbetween to get a random number btwn 1 and 9
but excluding 6 as a posibility. is it possible?

  #5   Report Post  
Michael
 
Posts: n/a
Default

Hey Ron
That's cool, and I thought I was thinking outside the square !!
--
Michael Mitchelson


"Ron Coderre" wrote:

Try this:

=CHOOSE(RANDBETWEEN(1,8),1,2,3,4,5,7,8,9)

Does that help?
--
Regards,
Ron


"Tracker" wrote:

im trying to use rand() or randbetween to get a random number btwn 1 and 9
but excluding 6 as a posibility. is it possible?



  #6   Report Post  
Tracker
 
Posts: n/a
Default

both of your answers were very helpful.If only i could think like that.Thankyou

"Michael" wrote:

Hi Tracker
Maybe you could also consider this option.
=IF(RANDBETWEEN(1,9)=6,"",RANDBETWEEN(1,9))

HTH
Michael Mitchelson


"JE McGimpsey" wrote:

Assuming this is a different question than your other thread (please
keep questions in the same thread if possible - it reduces the chance
that people will waste time suggesting answers that have already been
offered), here's one way, using 2 cells (it's actually the same way, of
course):

A1: =RANDBETWEEN(1,8)
A2: =A1+(A1=6)



In article ,
"Tracker" wrote:

im trying to use rand() or randbetween to get a random number btwn 1 and 9
but excluding 6 as a posibility. is it possible?


  #7   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Unfortunately, that won't work. The second RANDBETWEEN is independent of
the first, so if the first one<6, the second one *could* =6.

In article ,
"Michael" wrote:

=IF(RANDBETWEEN(1,9)=6,"",RANDBETWEEN(1,9))

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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
How to keep random number from changing using RANDBETWEEN? TXlimogirl Excel Worksheet Functions 6 April 3rd 23 04:41 PM
Excel random number JJ Excel Discussion (Misc queries) 2 May 4th 05 01:19 PM
Excel 2003 random number generator JJ Excel Discussion (Misc queries) 1 May 4th 05 01:02 PM
Selecting at random with weighted probability Damage Excel Worksheet Functions 2 January 31st 05 11:06 PM


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