• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

List of randbetween numbers and locking them

kidiowa

New Member
Hi folks, I'm needing some help. My son is trying to create an integer game in excel for his 6th grade class. We have the majority set up so that a random list of integers are created for students to add/subtract together.

Here's my problem:

Right now every time you type in your answer to the addition/subtraction problem, all the random numbers reset to a new list of numbers. Is there a way to create a macro/use VBA so that a user can click a "Start" button, and it will clear the answers column and create a random list of integers in two separate columns for the students to add/subtract? The list of random numbers won't change until the "Start" button is hit again. And bonus points: how difficult would it be (in VBA) for the user to input in two cells the minimum (example, -100) and maximum (example, 250) numbers to randbetween and use that as the min/max parameters in the randbetween? And how difficult for a user to put in a number of questions they want to answer, and have a random addition/subtraction used for each question? Clear as mud?

I've tried recording a macro but it won't take. ANY help appreciated, I think I've got a 12 year old hooked on excel and this part is really frustrating him. I'll attach the working copy we're using right now.
 

Attachments

  • Ian Integer Game.xlsx
    16 KB · Views: 4
Sounds like fun! See if this will work for you. I changed a few formulas, and fixed the dial chart so that it still works no matter how many questions you have.
 

Attachments

  • Ian Integer Game Macro.xlsm
    25.5 KB · Views: 5
it works perfect!!! thank you so much, my son and I thank you. I'll have to deep dive the VBA to see how it works, that thing is awesome!
 
Made a small change to the dial chart, realized that the I only calculated dial value, not "how much is left" of the dial to show.
 

Attachments

  • Ian Integer Game Macro Fix.xlsm
    25.3 KB · Views: 2
Back
Top