Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Addition worksheet generator
I thought it would be simple to set-up an addition exercise generator for my
class of young Abacus students. The exercises typically involve adding a series of numbers (more than two) for a positive result. The student adds from top to bottom, and should not encounter a negative sum at any point. To illustrate, 5 -4 -7 8 3 is not acceptable (summing through the third number results in a negative) but 5 4 -7 8 3 is OK. I tried to use the RANDBETWEEN() function to generate random numbers for the problems, but the results are not usable because of this constraint. I'm hoping for some clever way to ensure that the numbers all line up nicely so I always get a positive figure at each step of the summation? Negative numbers do need to be allowed however. Sriram |
#2
|
|||
|
|||
How about this
in a1 =ROUND(RAND()*10,0)*IF(RAND()0.5,-1,1) in a2 =IF(SUM($A$1:A1)10,ROUND(RAND()*10,0)*IF(RAND()0 .5,-1,1),ABS(SUM($A$1:A1))+ROUND(RAND()*(10-ABS(SUM($A$1:A1))),0)) drag formula down for as many rows as you want for your sum Lance "Sriram" wrote: I thought it would be simple to set-up an addition exercise generator for my class of young Abacus students. The exercises typically involve adding a series of numbers (more than two) for a positive result. The student adds from top to bottom, and should not encounter a negative sum at any point. To illustrate, 5 -4 -7 8 3 is not acceptable (summing through the third number results in a negative) but 5 4 -7 8 3 is OK. I tried to use the RANDBETWEEN() function to generate random numbers for the problems, but the results are not usable because of this constraint. I'm hoping for some clever way to ensure that the numbers all line up nicely so I always get a positive figure at each step of the summation? Negative numbers do need to be allowed however. Sriram |
#3
|
|||
|
|||
That appears to work nicely, except I changed it slightly to restrict the
first number to be positive; one of the rules of the game. In the meanwhile, I had worked out a slightly different approach which also fits the need, something like this: A1 =RANDBETWEEN(1,10) A2 =RANDBETWEEN(-1*A1,10) A3 =RANDBETWEEN(-1*(A1+A2),10) and so on. "LanceB" wrote in message ... How about this in a1 =ROUND(RAND()*10,0)*IF(RAND()0.5,-1,1) in a2 =IF(SUM($A$1:A1)10,ROUND(RAND()*10,0)*IF(RAND()0 .5,-1,1),ABS(SUM($A$1:A1)) +ROUND(RAND()*(10-ABS(SUM($A$1:A1))),0)) drag formula down for as many rows as you want for your sum |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copyright and worksheet protection | Excel Discussion (Misc queries) | |||
Executing macro for all worksheet from a different worksheet | New Users to Excel | |||
Reference Data in Moved Worksheet | Setting up and Configuration of Excel | |||
Linking items GREATER THAN O on another worksheet in the same Work | Excel Discussion (Misc queries) | |||
Worksheet name and Backward compatibility | Excel Discussion (Misc queries) |