Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 454
Default Random Text selection Q

I have 10 text statements in A1:A10. Is it possible to return in A15 1
radom selection from this range, only proviso is that if Z1=0, <blank
i.e. don't show anything in A15

Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Random Text selection Q

One way:

=IF(Z1="","",INDEX(A1:A10,ROUND(RAND()*9,0)+1)


--
Biff
Microsoft Excel MVP


"Sean" wrote in message
...
I have 10 text statements in A1:A10. Is it possible to return in A15 1
radom selection from this range, only proviso is that if Z1=0, <blank
i.e. don't show anything in A15

Is this possible?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Random Text selection Q

Put this in A15:

=IF(Z1=0,"",INDIRECT("A"&INT(10*RAND())+1))

Hope this helps.

Pete

On Feb 20, 6:19*pm, Sean wrote:
I have 10 text statements in A1:A10. Is it possible to return in A15 1
radom selection from this range, only proviso is that if Z1=0, <blank
i.e. don't show anything in A15

Is this possible?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 454
Default Random Text selection Q

Thanks Pete and T, will test this tomorrow. I guess it will change
based on the sheet calc?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Random Text selection Q

I guess it will change based on the sheet calc?

Yes, *every* time a calculation takes place it will change.

If you want it to remain static you could set calculation to manual, or,

Enter this formula in B1 and copy down to B10:

=RAND()

Then, select the range A1:B10 and sort on column B any order, doesn't
matter.

Then you could use this formula:

=IF(Z1="","",A1)


--
Biff
Microsoft Excel MVP


"Sean" wrote in message
...
Thanks Pete and T, will test this tomorrow. I guess it will change
based on the sheet calc?





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
Random Selection Craig Excel Worksheet Functions 3 September 27th 07 05:18 PM
Random selection of text cells CJ Excel Discussion (Misc queries) 3 September 10th 06 07:05 AM
Random number selection kwidener Excel Worksheet Functions 5 September 5th 06 04:04 PM
Random Selection Cookie New Users to Excel 2 May 3rd 06 12:05 AM
Random Selection Cris Excel Worksheet Functions 2 October 16th 05 06:15 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"