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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

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
1
5
2
2
3
4
4
3
5
5
6
4
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,925
Messages
5,447,320
Members
405,447
Latest member
WPY

This Week's Hot Topics

Top