Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 187
Default RANDBETWEEN function returns #NAME?

Using this formula,
=IF(K2="BER",randbetween(22,26),randbetween(35,37) )

I get the #NAME? error.

Analysis toolpak is installed. Using a work pc with XL 03 and relying
on company IT department to solve this issue is not in the cards.

SO, how can this formula be rewritten using the RAND function?
Presumably some combination of RAND and INT but I'm not sure.

Thanks.

Dave

  #2   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default RANDBETWEEN function returns #NAME?

do other functions from the analysis toolpack work?
Networkdays() etc.
try reinstalling and reloading analysis toolpack?

=22+floor(rand()*4.9999999999999,1) is approximately the same as
randbetween(22,226)

"Dave F" wrote:

Using this formula,
=IF(K2="BER",randbetween(22,26),randbetween(35,37) )

I get the #NAME? error.

Analysis toolpak is installed. Using a work pc with XL 03 and relying
on company IT department to solve this issue is not in the cards.

SO, how can this formula be rewritten using the RAND function?
Presumably some combination of RAND and INT but I'm not sure.

Thanks.

Dave


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default RANDBETWEEN function returns #NAME?

I do not know exactly the purpose of RANDBETWEEN function but I guess it
returns and random number between the two boundaries. With RAND and INT, as
you guessed, you can build such function, for example:
=INT(22+RAND()*(26-22)) will return a random integer from 22, 23, 24 and 25.
note that the upper boundary (26) is NOT included in the possible numbers to
be returned, so change to =INT(22+RAND()*(27-22)) to include it.

Dave F wrote:
Using this formula,
=IF(K2="BER",randbetween(22,26),randbetween(35,37 ))

I get the #NAME? error.

Analysis toolpak is installed. Using a work pc with XL 03 and relying
on company IT department to solve this issue is not in the cards.

SO, how can this formula be rewritten using the RAND function?
Presumably some combination of RAND and INT but I'm not sure.

Thanks.

Dave


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200707/1

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default RANDBETWEEN function returns #NAME?

There is a reported bug where even if Analysis toolpak is enabled it
occasionally fails to load. Sometimes closing Excel & reopening does the
trick, but otherwise it may be worth disabling then re-enabling the analysis
toolpak.

As far as your suggestion of RAND and INT is concerned, try
=IF(K2="BER",INT(22+5*RAND()),INT(35+3*RAND()))
--
David Biddulph

"Dave F" wrote in message
oups.com...
Using this formula,
=IF(K2="BER",randbetween(22,26),randbetween(35,37) )

I get the #NAME? error.

Analysis toolpak is installed. Using a work pc with XL 03 and relying
on company IT department to solve this issue is not in the cards.

SO, how can this formula be rewritten using the RAND function?
Presumably some combination of RAND and INT but I'm not sure.

Thanks.

Dave



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 187
Default RANDBETWEEN function returns #NAME?

David, yes I happened to do this, and it seemed to fix the problem.

Thanks, also, for your alternative formula.

Dave

On Jul 31, 11:58 am, "David Biddulph" <groups [at] biddulph.org.uk
wrote:
There is a reported bug where even if Analysis toolpak is enabled it
occasionally fails to load. Sometimes closing Excel & reopening does the
trick, but otherwise it may be worth disabling then re-enabling the analysis
toolpak.

As far as your suggestion of RAND and INT is concerned, try
=IF(K2="BER",INT(22+5*RAND()),INT(35+3*RAND()))
--
David Biddulph

"Dave F" wrote in message

oups.com...



Using this formula,
=IF(K2="BER",randbetween(22,26),randbetween(35,37) )


I get the #NAME? error.


Analysis toolpak is installed. Using a work pc with XL 03 and relying
on company IT department to solve this issue is not in the cards.


SO, how can this formula be rewritten using the RAND function?
Presumably some combination of RAND and INT but I'm not sure.


Thanks.


Dave- Hide quoted text -


- Show quoted text -



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
INT Function Returns 1 bhavesh Excel Worksheet Functions 3 December 29th 06 02:48 PM
How do you avoid duplicates when using the randbetween function? Monica Excel Worksheet Functions 2 February 16th 06 05:45 AM
randbetween function Tracey Excel Discussion (Misc queries) 5 February 11th 06 12:23 AM
Why doesn't my =RANDBETWEEN function work? DanielWalters6 Excel Discussion (Misc queries) 4 December 19th 05 10:28 AM
why doesnt my RANDBETWEEN function work? Edd C Excel Worksheet Functions 4 August 10th 05 02:02 PM


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