Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 - |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Woes - Formula bug (I guess) | Excel Worksheet Functions | |||
IRR Guess Problem | Excel Worksheet Functions | |||
need a roster that 3 kids can work to day by day? | Excel Worksheet Functions | |||
something having kids altogather from different countries | Excel Discussion (Misc queries) | |||
Game score without game being played | Excel Worksheet Functions |