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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

J.Ty.

Well-known Member
Joined
Feb 4, 2012
Messages
1,102
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)
 

Watch MrExcel Video

Forum statistics

Threads
1,095,267
Messages
5,443,428
Members
405,235
Latest member
1Thess521

This Week's Hot Topics

Top