ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how can i set up rand or rand between to give only -1 or 1? (https://www.excelbanter.com/excel-worksheet-functions/118462-how-can-i-set-up-rand-rand-between-give-only-1-1-a.html)

Uesiet

how can i set up rand or rand between to give only -1 or 1?
 
i need a function to generate either 1 or -1 using randbetween in Exce;

David Biddulph

how can i set up rand or rand between to give only -1 or 1?
 
=-1+2*RANDBETWEEN(0,1)
--
David Biddulph

"Uesiet" wrote in message
...
i need a function to generate either 1 or -1 using randbetween in Exce;




Biff

how can i set up rand or rand between to give only -1 or 1?
 
Try this:

=CHOOSE(RANDBETWEEN(1,2),-1,1)

Biff

"Uesiet" wrote in message
...
i need a function to generate either 1 or -1 using randbetween in Exce;




[email protected]

how can i set up rand or rand between to give only -1 or 1?
 
"Uesiet" wrote apparently:
i need a function to generate either 1 or -1 using randbetween in Exce;


=2*(RAND()0.5) - 1


Vijay Chary

how can i set up rand or rand between to give only -1 or 1?
 
Answer:
=(-1)^Int(Rand(2)+1)

"Uesiet" wrote:

i need a function to generate either 1 or -1 using randbetween in Exce;


MartinW[_2_]

how can i set up rand or rand between to give only -1 or 1?
 
Couple of observations,

1 Your formula doesn't seem to work, =RAND(2) isn't correct syntax

2 Did you realise you replied to a 2 year old post?
http://groups.google.com.au/group/mi...af7728a9ad196d

Cheers
Martin



"Vijay Chary" wrote in message
...
Answer:
=(-1)^Int(Rand(2)+1)

"Uesiet" wrote:

i need a function to generate either 1 or -1 using randbetween in Exce;




Vijay Chary

how can i set up rand or rand between to give only -1 or 1?
 
Hi Martin !! :)
Yeah, I made a mistake in the formula. It should be

==(-1)^(INT(2*RAND())+1)

How do you find out how old any post is !?

Vijay

"MartinW" wrote:

Couple of observations,

1 Your formula doesn't seem to work, =RAND(2) isn't correct syntax

2 Did you realise you replied to a 2 year old post?
http://groups.google.com.au/group/mi...af7728a9ad196d

Cheers
Martin



"Vijay Chary" wrote in message
...
Answer:
=(-1)^Int(Rand(2)+1)

"Uesiet" wrote:

i need a function to generate either 1 or -1 using randbetween in Exce;





MartinW[_2_]

how can i set up rand or rand between to give only -1 or 1?
 
Hi Vijay,

I just did a Google Groups search for the subject line...
how can I set up rand or rand between to give only -1 or 1?

Which returned nothing so I cut it back to...
how can I set up rand or rand between

And there it was...

You can find Google Groups by going to the Google
homepage and clicking on the more dropdown at
the top of the page.

Cheers
Martin


"Vijay Chary" wrote in message
...
Hi Martin !! :)
Yeah, I made a mistake in the formula. It should
be

==(-1)^(INT(2*RAND())+1)

How do you find out how old any post is !?

Vijay

"MartinW" wrote:

Couple of observations,

1 Your formula doesn't seem to work, =RAND(2) isn't correct syntax

2 Did you realise you replied to a 2 year old post?
http://groups.google.com.au/group/mi...af7728a9ad196d

Cheers
Martin



"Vijay Chary" wrote in message
...
Answer:
=(-1)^Int(Rand(2)+1)

"Uesiet" wrote:

i need a function to generate either 1 or -1 using randbetween in
Exce;







David Biddulph[_2_]

how can i set up rand or rand between to give only -1 or 1?
 
If you are using Microsoft's web interface at
http://www.microsoft.com/office/comm...g=en&cr=USeach thread is labelled with the date of the most recent message. If you usethe + button to expand the thread, the date of each message on the thread isshown.If you use a newsreader such as Outlook Express, the date would appear bydefault in the Sent column.--David Biddulph"Vijay Chary" wrote in ...... How do you find out how old any post is !? Vijay "MartinW" wrote: Couple of observations, 1 Your formula doesn't seem to work, =RAND(2) isn't correct syntax 2 Did you realise you replied to a 2 year old post?http://groups.google.com.au/group/microsoft.public.excel.worksheet.functions/browse_thread/thread/eca2b44b1463a48a/c8af7728a9ad196d?hl=en&lnk=st&q=how+can+i+set+up+r and+or+rand+between+#c8af7728a9ad196d Cheers Martin "Vijay Chary" wrote in message ... Answer: =(-1)^Int(Rand(2)+1) "Uesiet" wrote: i need a function to generate either 1 or -1 using randbetween inExce;



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com