# MathsClass

A blog about teaching and learning in a maths classroom.

## Generating random questions in Excel - Basic operations

Sunday, 11 March 2007 | 0 Comments

In this second post about using Excel to generate random questions, the first showed how to make a question about money, I show the simple formulae used to generate questions using the 4 basic operations.

The key Excel function used here is “RANDBETWEEN”.  This function returns a random integer between the numbers specified.  In the multiplication and division questions, for example, this allows you to restrict the questions to the times tables.

#### Excel Output

A B C D E F G H
1 50 + 10 60 50 + 10 = ___ 60
2 98 - 42 56 98 – 42 = ___ 56 98 42 56
3 7 × 6 42 7 × 6 = ___42
4 6 ÷ 2 3 6 ÷ 2 = ___3

#### Formulas:

A1
=RANDBETWEEN(30,100)
C1

=RANDBETWEEN(3,30)
D1
=A1+C1
E1
=CONCATENATE(A1,&quot; &quot;,B1,&quot; &quot;,C1,&quot; = ___&quot;,D1)
A2
=IF(H2&lt;0,G2,F2)
C2
=IF(H2&lt;0,F2,G2)
D2
=A2-C2
E2
=CONCATENATE(A2,&quot; &quot;,B2,&quot; &quot;,C2,&quot; = ___&quot;,D2)
F2
=RANDBETWEEN(3,100)
G2
=RANDBETWEEN(3,100)
H2
=F2-G2
A3
=RANDBETWEEN(2,12)
C3
=RANDBETWEEN(2,12)
D3
=A3*C3
E3
=CONCATENATE(A3,&quot; &quot;,B3,&quot; &quot;,C3,&quot; = ___&quot;,D3)
A4
=C4*D4
C4
=RANDBETWEEN(2,12)
D4
=RANDBETWEEN(2,12)
E4
=CONCATENATE(A4,&quot; &quot;,B4,&quot; &quot;,C4,&quot; = ___&quot;,D4)

Posted in • How toSoftwareExcel | Short URL: http://mths.co/1190

• Share:

There are no comments for this entry yet.

Commenting is not available in this channel entry.

New  Subscribe to the …

Simon Job — eleventh year of teaching maths in a public high school in Western Sydney, Australia.
MathsClass is about teaching and learning in a maths classroom. more→

@simonjob