Random number between 1 and 5 with no immediate repeat?

HJay

New Member
Joined
Nov 30, 2007
Messages
31
Hi,

I am attempting to make a maths worksheet that generates random maths sums but I don't want two sums in a row to have the same question (I want the same sum to appear later, just not twice in a row). Is this possible with a simple excel formula? I have been trying to put RANDBETWEEN(1,5) into an IF statement but I have not been having much luck...
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi,

Is this what you intend?

Book2
L
15
22
34
43
55
64
Sheet2
Cell Formulas
RangeFormula
L1L1=RANDBETWEEN(1,5)
L2:L6L2=1+MOD((L1-1+RANDBETWEEN(1,4)),5)
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top