View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
G0dsg1rl G0dsg1rl is offline
external usenet poster
 
Posts: 3
Default multi, nested functions...

Hi,
I am working on a homework assignment and am experiencing challenges.
This worked
=IF(COUNTIF(D2:D7,D1),RANDBETWEEN(1,52),D1)
but this is not
=IF(COUNTIF(D1D3:D7,D2),RANDBETWEEN(1,52),D1)
nor is this
=IF(COUNTIF(D1,D3:D7,D2),RANDBETWEEN(1,52),D1)
nor is this
=IF(COUNTIF(D1/D3:D7,D2),RANDBETWEEN(1,52),D1)
I am attempting to have it check for repeat numbers. I am generating 7
random numbers between 1-52. I want to check and make sure that none of them
are repeating. If there is a repeat, I want to do a new randbetween.
Does anyone know how to generate random numbers without replacement?
Yes it is a poker game. Fun but challenging. Thank you for your time and
assistance.