Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2007

Tip: Looking for answers? Try searching our database.

pls help making mathematical puzzels for children

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Navid Sami - 30 Jan 2007 10:36 GMT
Hi
I appreciate if any one who is a bit more expert in excel than me can
help me make a mathematical puzzle for children. I try to explain what I
mean here:

The Idea is that we can generate numbers (say from one to ten) randomly
in column A1:A10 then generate one of + or - in front of them in column
B1:B10 and yet another random number random number between 1 and 10 in
column C1:C10

The rest I think is easy, we check their answear in D1:D10 and give them
point if it's correct

any ideas please?
thanks
Bob Phillips - 30 Jan 2007 11:29 GMT
Navid,

Normally, you use the RAND function do generate random numbers. The problem
with that is that when you add something else to the spreadsheet, it
calculates a new random number. So your kids might see a line that says 3 +
4, type in 7, and the sum changes to 7 - 2.

This can be overcome like so

First, ensure cell A1 is empty and goto Tools>Options and on the Calculation
tab check the Iteration checkbox to stop the Circular Reference message.

Then in A1 add this formula: =IF($F$1="","",INT((RAND()*10+1)))

In B1 add: =IF($F$1="","",IF(INT(RAND()*2),"+","-"))

And C1 add: =IF($F$1="","",INT((RAND()*10+1)))

At this point, A1, B1 and C1 will be empty.

Copy A1:C1 down to A10:C10.

When ready to go, just put some character, say an x, in F1.

To force a reset, clear cell F1, edit cell A1:C1, don't change them,
just edit to reset to blank, copy A1:C1 down to A10:C10, and re-input F1.

Signature

---
HTH

Bob

(change the xxxx to gmail if mailing direct)

> Hi
> I appreciate if any one who is a bit more expert in excel than me can help
[quoted text clipped - 11 lines]
> any ideas please?
> thanks
Navid Sami - 30 Jan 2007 13:56 GMT
It's great, thanks, but with this approach then I don't know how to
check whether the answer is right or not. I mean I can not just write
A1B1C1 I tried also =A1{B1}C1 in cell D1 and hoped excel would calculate
the result in B1 before passing it, but no success! and another thing
how can we make sure that if B1 is - then A1 should be greater than C1
(this to avoid negative numbers)
tnx,

> Navid,
>
[quoted text clipped - 22 lines]
> To force a reset, clear cell F1, edit cell A1:C1, don't change them,
> just edit to reset to blank, copy A1:C1 down to A10:C10, and re-input F1.
Nasir - 30 Jan 2007 14:01 GMT
Naveed, you might want to try conditional formatting. Its under Format
option. You can use red or green colour for right and wrong if the
cell value doesnt generate the right answer.

Nasir.

> It's great, thanks, but with this approach then I don't know how to
> check whether the answer is right or not. I mean I can not just write
[quoted text clipped - 30 lines]
> > To force a reset, clear cell F1, edit cell A1:C1, don't change them,
> > just edit to reset to blank, copy A1:C1 down to A10:C10, and re-input F1.- Hide quoted text -- Show quoted text -
Navid Sami - 30 Jan 2007 14:15 GMT
yes, that's absolutely a good Idea but I need to generate the answer
first, and that's the question how do I make excel evaluate B1 and uses
it in a formula

> Naveed, you might want to try conditional formatting. Its under Format
> option. You can use red or green colour for right and wrong if the
[quoted text clipped - 26 lines]
>>> To force a reset, clear cell F1, edit cell A1:C1, don't change them,
>>> just edit to reset to blank, copy A1:C1 down to A10:C10, and re-input F1.- Hide quoted text -- Show quoted text -
Nasir - 30 Jan 2007 14:56 GMT
Navid,

this might help: use the suggested rand() function to generate the
random numbers. then go to "Tools" then options then choose
calculation tab. There, select manual calculation instead of
automatic. That way, once the random numbers are generated, they will
persist unless you hit "F9" for manual calculation. I think this
should work for the time being.
If it doesn then you might wanna write a macro generating the random
numbers as you wish. That way you will customize the selection of
fields and running the program for number generation as you wish.

Nasir.

> yes, that's absolutely a good Idea but I need to generate the answer
> first, and that's the question how do I make excel evaluate B1 and uses
[quoted text clipped - 30 lines]
> >>> To force a reset, clear cell F1, edit cell A1:C1, don't change them,
> >>> just edit to reset to blank, copy A1:C1 down to A10:C10, and re-input F1.- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -
Nasir - 30 Jan 2007 15:05 GMT
I have tried this and it should work for your requirement as well.
use this for col A and col B
=ROUND((RAND()*(10-1)+1),0)
use this for col D
=Brow+Crow
for column C use conditional formatting as: cell value "is equal to"  
=drow
Make sure, you have changed the calculation from automatic to manual.
"F9" will calculate the sheet manually(for new values)
All the best,
Nasir.

> Navid,
>
[quoted text clipped - 44 lines]
> > >>> To force a reset, clear cell F1, edit cell A1:C1, don't change them,
> > >>> just edit to reset to blank, copy A1:C1 down to A10:C10, and re-input F1.- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -
MartinW - 30 Jan 2007 15:09 GMT
Hi Navid

I haven't tried any of this but a few ideas to throw into the pot.

To avoid negative numbers you could use RANDBETWEEN instead
of RAND. In column A RANDBETWEEN(10,20) and in column C
RANDBETWEEN(1,10) or you could use (6,10) and (1,5)
or whatever.

To generate your + or - in column B you could use  =IF(ISODD(A1),"+","-")
and then you can use ISODD(A1) to generate the correct answer

To show the correct answer you could use a wingding tick and cross.
In wingding font alt +0251 is a cross and alt +0252 is a tick.
(To use unicode numbers hold down alt and type the numbers then let go
of the alt key. You must use the number pad not the numbers at the top
of your keyboard.). Put these characters in some cells off to the right like
M1
and M2. Then in say F1 put something like  =IF(D1=E1,M1,M2) where
D1 is your kids answer and E1 is the correct answer.

HTH
Martin
Navid Sami - 30 Jan 2007 15:46 GMT
> Hi Navid
>
[quoted text clipped - 4 lines]
> RANDBETWEEN(1,10) or you could use (6,10) and (1,5)
> or whatever.

If I use this then I will never have for expample 5-2 or 6+1

> To generate your + or - in column B you could use  =IF(ISODD(A1),"+","-")
> and then you can use ISODD(A1) to generate the correct answer

then I will always have + with odd numbers and - with pair
I will never get 3-2 or 4+2

> To show the correct answer you could use a wingding tick and cross.
> In wingding font alt +0251 is a cross and alt +0252 is a tick.
[quoted text clipped - 4 lines]
> and M2. Then in say F1 put something like  =IF(D1=E1,M1,M2) where
> D1 is your kids answer and E1 is the correct answer.

this sounds interesting but I just didn't work when I tried I get a û
in M1 and M2 could you explain more detailed how we do this please?

> HTH
> Martin
MartinW - 30 Jan 2007 16:09 GMT
Hi Navid,

> this sounds interesting but I just didn't work when I tried I get a û
> in M1 and M2 could you explain more detailed how we do this please?

That bit is easy, just change the font in that cell to wingding before you
use the unicode keystrokes.

As for your other questions, my ideas were more along the idea
of food for thought rather than solutions. It's two o'clock in the morning
here, so for now I'm off to bed. I'll post back here tomorrow when
I've had some time to think it through a bit more.

Regards
Martin
Bob Phillips - 30 Jan 2007 14:42 GMT
Navid,

What you could do is generate a randome number in C between -10 and 10
depending upon the sign in B, but hide that sign using a custom format of
0:0

BTW, I forgot some bits in the formulae, theye should be (including the sign
bit)

A1: =IF(($F$1="")+(A1<>0),A1,INT((RAND()*10+1)))

B1: =IF(($F$1="")+(B1>0),B1,IF(INT(RAND()*2),"+","-"))

C1: =IF(($F$1="")+(C1<>0),C1,--(B1&INT((RAND()*10+1))))

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> It's great, thanks, but with this approach then I don't know how to check
> whether the answer is right or not. I mean I can not just write A1B1C1 I
[quoted text clipped - 31 lines]
>> To force a reset, clear cell F1, edit cell A1:C1, don't change them,
>> just edit to reset to blank, copy A1:C1 down to A10:C10, and re-input F1.
Navid Sami - 30 Jan 2007 15:26 GMT
I still have cases where A1 is bigger than C1 and B1 is -
and how can we check whether the result kids have entered in D1 is
correct? something like A1{B1}C1 where {B1} will return the value it has
gotten from the rand function

> Navid,
>
[quoted text clipped - 10 lines]
>
> C1: =IF(($F$1="")+(C1<>0),C1,--(B1&INT((RAND()*10+1))))
Bob Phillips - 30 Jan 2007 15:52 GMT
Just add A1 & C1

=D1=A1+C1

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

>I still have cases where A1 is bigger than C1 and B1 is -
> and how can we check whether the result kids have entered in D1 is
[quoted text clipped - 15 lines]
>>
>> C1: =IF(($F$1="")+(C1<>0),C1,--(B1&INT((RAND()*10+1))))
joeu2004 - 30 Jan 2007 12:22 GMT
> The Idea is that we can generate numbers (say from one to ten) randomly
> in column A1:A10 then generate one of + or - in front of them in column
> B1:B10 and yet another random number random number between 1 and
> 10 in column C1:C10

As Bob mentioned, the problem is that Excel's RAND() function is
volatile.  Every change to the spreadsheet caused RAND() to be
recalculated.  I avoid that by creating MYRAND().  (I will explain how
below.)  Then create the following formulas:

A1: =int(10*myrand()+1)
B1: =if(myrand()<=0.5,"+","-")
C1: =int(10*myrand()+1)

Copy A1:C1 down through A10:C10.

Use ctrl-alt-F9 to generate a new set of random numbers.

Create MYRAND() as follows.

1. Press alt-F11 to open the VBA editor window.
2. Click Insert -> Module.
3. Enter the following text:

   function myrand()
   myrand = rnd()
   end function

4. Close the VBA editor window.
joeu2004 - 30 Jan 2007 12:40 GMT
PS....

I wrote:
> function myrand()
> myrand = rnd()
> end function

As an embellishment, you can write "function myrand(optional rng)"
instead.

Then, if you enter =int(10*myrand($F$1)+1) in A1 and C1, whenever you
modify F1, the random numbers will change.  That would be an
alternative to pressing ctrl-alt-F9.

Since the parameter is "optional rng", you can still write myrand().  
You can also write myrand($F$1:$F$10) in situations where you would
like new random numbers whenever any one of a range of cells is
modified.
Billy Liddel - 30 Jan 2007 16:49 GMT
Navid

I think it is better to set the sums with a macro then they they are just
values

Sub setSums()
Dim i As Integer, tmp As Integer, op As String
'set the numbers
Range("D2:d11").ClearContents
For i = 2 To 11
Cells(i, 1) = Int(Rnd() * 10) + 1
Cells(i, 3) = Int(Rnd() * 10) + 1
'Enter the operator
x = Rnd
 If x > 0.5 Then
   Cells(i, 2) = "+"
   Else
   Cells(i, 2) = "-"
 End If
 ' make sure there are no minus answers
 'swap column C with column A
 If Cells(i, 1) < Cells(i, 3) And _
   Cells(i, 2) = "-" Then
   tmp = Cells(i, 3)
   Cells(i, 3) = Cells(i, 1)
   Cells(i, 1) = tmp
 End If

End Sub

Copy this into a VB Module (ALT + F11, Insert, Module)
Then draw a rectangle using Excel's drawing tools, right-click and choose
assign macro to the object

So you have Numb 1 in column A, operator in Column B, Numb 2 in C. The
answer goes in D. In E2 copy this formula

=IF($D2="","K",IF(AND($B2="-",$D2=A2-C2),"J",IF(AND($B2="+",$D2=$A2+$C2),"J","L")))

Copy the formula down to A11 and format the range to font Windings. This
will give a smiley face if the answer in Col  is right.

Alternatively, email peter_atherton@hotmail.com and I'll post you a workbook.

Regards
Peter

> Hi
> I appreciate if any one who is a bit more expert in excel than me can
[quoted text clipped - 11 lines]
> any ideas please?
> thanks
Tushar Mehta - 30 Jan 2007 22:29 GMT
In addition to the ideas in this discussion so far, check out
http://www.tushar-mehta.com/excel/education/

Signature

Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

> Hi
> I appreciate if any one who is a bit more expert in excel than me can
[quoted text clipped - 11 lines]
> any ideas please?
> thanks
Navid Sami - 31 Jan 2007 13:21 GMT
> In addition to the ideas in this discussion so far, check out
> http://www.tushar-mehta.com/excel/education/

Thanks everyone for your greate help
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.