ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Guess my number game for kids. (https://www.excelbanter.com/excel-worksheet-functions/137529-guess-my-number-game-kids.html)

Honey

Guess my number game for kids.
 

Hi all,

I could do with some help please. I want to create a game for my
Primary school class to play.

I want Excel to generate a random number( between 1 and 100) and then
for the children to enter guesses as the number and excel to return
the answers too high, too low and correct..... I think I am ok with
doing this but I want to keep track of how many attempts they need to
find the number. Does anyone know if Excel is able to do this and how?

Thanks very much and I hope you all have an excellent easter.

Honey


Susan

Guess my number game for kids.
 
hello!
yes, you can do this with a macro, easily.
first you'd neet to select the random number and display it in the
correct cell (lock it so the kids can't mess it up).
then you'd have to name the cell in which they are entering their
guesses.
you'd have to have a worksheet_change routine that instantly checks
their guess against the random number & displays the correct
response: "Number is too high!" or "Number is too low!" or "Yes!
That's it!".
then you'd need one other cell to the side that adds 1 (+1) to that
counter every time they guess a number..... that would also have to
reset to 0 when they do get the correct number.
so the counter would have to be a worksheet_change macro connected to
that specific cell, upon exiting that cell (or hitting "enter") it
would run & update the number.
hope this gives you some ideas
susan



On Apr 2, 7:46 am, "Honey" wrote:
Hi all,

I could do with some help please. I want to create a game for my
Primary school class to play.

I want Excel to generate a random number( between 1 and 100) and then
for the children to enter guesses as the number and excel to return
the answers too high, too low and correct..... I think I am ok with
doing this but I want to keep track of how many attempts they need to
find the number. Does anyone know if Excel is able to do this and how?

Thanks very much and I hope you all have an excellent easter.

Honey




Mike

Guess my number game for kids.
 
I've only addressed your latter point because you say your OK with the rest
so counting guesses is easy. Right click the sheet tab with your game in and
paste this code in

Private Sub Worksheet_Calculate()
Cells(1, 4).Value = Cells(1, 4).Value + 1
End Sub

It uses D1 so you may wish to change it. Reset the number when the children
get the correct answer by manually changing it to zero. Excel won't interpret
this as a reclaculate and set it to 1.

Mike

"Honey" wrote:


Hi all,

I could do with some help please. I want to create a game for my
Primary school class to play.

I want Excel to generate a random number( between 1 and 100) and then
for the children to enter guesses as the number and excel to return
the answers too high, too low and correct..... I think I am ok with
doing this but I want to keep track of how many attempts they need to
find the number. Does anyone know if Excel is able to do this and how?

Thanks very much and I hope you all have an excellent easter.

Honey



Honey

Guess my number game for kids.
 

Thanks for your quick reply - I don't know much about Macros - now
seems like a good time to learn!
I will give it a go!

Regards,
Honey


On 2 Apr, 13:37, "Susan" wrote:
hello!
yes, you can do this with a macro, easily.
first you'd neet to select the random number and display it in the
correct cell (lock it so the kids can't mess it up).
then you'd have to name the cell in which they are entering their
guesses.
you'd have to have a worksheet_change routine that instantly checks
their guess against the random number & displays the correct
response: "Number is too high!" or "Number is too low!" or "Yes!
That's it!".
then you'd need one other cell to the side that adds 1 (+1) to that
counter every time they guess a number..... that would also have to
reset to 0 when they do get the correct number.
so the counter would have to be a worksheet_change macro connected to
that specific cell, upon exiting that cell (or hitting "enter") it
would run & update the number.
hope this gives you some ideas
susan

On Apr 2, 7:46 am, "Honey" wrote:

Hi all,


I could do with some help please. I want to create a game for my
Primary school class to play.


I want Excel to generate a random number( between 1 and 100) and then
for the children to enter guesses as the number and excel to return
the answers too high, too low and correct..... I think I am ok with
doing this but I want to keep track of how many attempts they need to
find the number. Does anyone know if Excel is able to do this and how?


Thanks very much and I hope you all have an excellent easter.


Honey




Susan

Guess my number game for kids.
 
post ?'s in the programming group...................
:)
susan

On Apr 2, 9:17 am, "Honey" wrote:
Thanks for your quick reply - I don't know much about Macros - now
seems like a good time to learn!
I will give it a go!

Regards,
Honey

On 2 Apr, 13:37, "Susan" wrote:



hello!
yes, you can do this with a macro, easily.
first you'd neet to select the random number and display it in the
correct cell (lock it so the kids can't mess it up).
then you'd have to name the cell in which they are entering their
guesses.
you'd have to have a worksheet_change routine that instantly checks
their guess against the random number & displays the correct
response: "Number is too high!" or "Number is too low!" or "Yes!
That's it!".
then you'd need one other cell to the side that adds 1 (+1) to that
counter every time they guess a number..... that would also have to
reset to 0 when they do get the correct number.
so the counter would have to be a worksheet_change macro connected to
that specific cell, upon exiting that cell (or hitting "enter") it
would run & update the number.
hope this gives you some ideas
susan


On Apr 2, 7:46 am, "Honey" wrote:


Hi all,


I could do with some help please. I want to create a game for my
Primary school class to play.


I want Excel to generate a random number( between 1 and 100) and then
for the children to enter guesses as the number and excel to return
the answers too high, too low and correct..... I think I am ok with
doing this but I want to keep track of how many attempts they need to
find the number. Does anyone know if Excel is able to do this and how?


Thanks very much and I hope you all have an excellent easter.


Honey- Hide quoted text -


- Show quoted text -




Susan

Guess my number game for kids.
 
see, i told you "programming" could help. :)
merjet's idea was closer to mine than okrobs - you said "primary"
grades so i was trying to have as little clicking of buttons as
possible & as much automatic stuff as possible......... mothers
understand that kind of stuff!
<visions of 8-year-old clicking buttons here there & everywhere!
:)
susan





Honey

Guess my number game for kids.
 

Lol - Thanks Susan



On 2 Apr, 19:20, "Susan" wrote:
see, i told you "programming" could help. :)
merjet's idea was closer to mine than okrobs - you said "primary"
grades so i was trying to have as little clicking of buttons as
possible & as much automatic stuff as possible......... mothers
understand that kind of stuff!
<visions of 8-year-old clicking buttons here there & everywhere!
:)
susan





All times are GMT +1. The time now is 06:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com