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...
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

J.Ty.

Well-known Member
Joined
Feb 4, 2012
Messages
1,101
Office Version
365, 2013, 2010
Platform
Windows, Web
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)
 

Forum statistics

Threads
1,089,644
Messages
5,409,497
Members
403,266
Latest member
HMR120

This Week's Hot Topics

Top