#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Random Text

I know we can randomally generate #s in excel VBA, but I
want to randomally select between text values.

Example if A1=Yes A2=No and A3=Maybe

I want a code that only looks at thses values and displays
one in cell B2. If I use the Randbetween formula function
I get the #Value error. because the formula is looking for
#'s

Is this possible?
Pete
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Random Text

Hardcoded:-

=CHOOSE(RANDBETWEEN(1,3),"Yes","No","Maybe")

Referenced:-

=CHOOSE(RANDBETWEEN(1,3),A1,B1,C1)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Pete" wrote in message
...
I know we can randomally generate #s in excel VBA, but I
want to randomally select between text values.

Example if A1=Yes A2=No and A3=Maybe

I want a code that only looks at thses values and displays
one in cell B2. If I use the Randbetween formula function
I get the #Value error. because the formula is looking for
#'s

Is this possible?
Pete



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.576 / Virus Database: 365 - Release Date: 30/01/2004


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
Display text at random Markv Excel Discussion (Misc queries) 2 July 25th 08 09:08 AM
Random select of text Tanya Excel Worksheet Functions 3 March 8th 08 02:50 PM
Random Text selection Q Sean Excel Worksheet Functions 4 February 20th 08 11:05 PM
random number with text T Harris Excel Worksheet Functions 10 December 30th 05 04:34 PM
matching random text Lance\\Sheri Excel Programming 1 October 7th 03 07:03 AM


All times are GMT +1. The time now is 03:28 AM.

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"