RAND

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is the formula I have in cell B4

=INT(RAND()*$AB$4)+

C4 has the same formula. I am creating a sheet for my daughters subtraction. I need the value to be greater in cell B4. Everytime I press 'F9' new values get generated. So I need the larger value to be on top.
 
This is the formula I have in cell B4:

=INT(RAND()*$AB$4)+1

C4 has the same formula. I am creating a sheet for my daughters subtraction.
I need the value to be greater in cell B4. Everytime I press 'F9' new values
get generated. So I need the larger value to be on top.

Keep this formula in B4, but change the C4 formula to

=INT((B4-1)*RAND())+1

That will ensure that C4 is strictly less than B4. C4 will range from 1 to B4-1.
 
Suppose the range that contains the words of interest is named WordRng.
In your example, that would be AH2:AS31.

In AE2:AE5 enter the literals:

rows
columns
row index
col index

In AF2:AF5, enter the formulas
=ROWS(WordRng)
=COLUMNS(WordRng)
=INT(RAND()*AF2)+1
=INT(RAND()*AF3)+1

Then, in the cell where you want the word selected at random, enter the
formula =INDEX(WordRng,AF4,AF5)

One could always merge everything into one long formula, but the above
makes it a little easier to understand what is going on.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
You may also want to check out a workbook developed to teach arithmetic
at http://www.tushar-mehta.com/excel/education/
...

WARNING! Anyone accessing Tushar's site with a browser that doesn't stack
multiple previosuly visited sites (or with all scripts and ActiveXs disabled)
will be in for a NASTY surprise. It's a practical impossibility to return to
where you were before visiting Tushar's site just by clicking on your browser's
Back button because of the way Tushar has set up his web pages.

Tushar: congratulations! I've seldom come across as user-hostile a web site as
the one linked above. You could teach spammers lessons on how to annoy users.
 
Anyone interested in productivity -- and not just trolling for a fight
-- would notice at the very left of the top frame of my web site:

Does the BACK button
appear disabled?
It isn't!
Click here to learn more

It's a shame you are so eager to bad-mouth people that it makes you
incapable of seeing the benefits of something even slightly different
from your run-of-the-mill expectation.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Anyone interested in productivity -- and not just trolling for a fight
-- would notice at the very left of the top frame of my web site:

Does the BACK button
appear disabled?
It isn't!
Click here to learn more

It's a shame you are so eager to bad-mouth people that it makes you
incapable of seeing the benefits of something even slightly different
from your run-of-the-mill expectation.
...

You're assuming that anyone who visits your site has a recent version of
Internet Explorer or similar. The poor souls using AOL as their browser, to name
one group, don't have drop-down arrows immediately to the right of their Back
buttons. There are a few older, non-Microsoft browsers with the same problem.
I'm just giving them a web health warning since it seems pertty obvious you
haven't tested your site with anything other than Internet Explorer.

Redirection *CAN* be achieved without fubarring bow the Back button itself
works. Click any makeashorterlink or tinyurl link then click on the Back button
a few times to see examples of how this works. Apparently you're not interested
in providing that level of functionality on your web site.

Your approach shows only that you don't fully understand web page programming
and/or user-friendliness. It's a bad design. That you provide a work-around for
one particular browser doesn't mitigate the fact that yours is a poor design.
 
Back
Top