close

I am having all sorts of problems with my spreadsheet. I fixed some but I
think the problem lies within the Rand() function.
I want a spreadsheet (on one page) (what appears to the students) four
columns of simple arithmetic problems.
I want to be able to adjust the operation: -*/. And have the spreadsheet
calculate the solutions.
However I also want to be able to set a range of values such as the first
column using numbers 1-10 the second 1-15 third 1-20 and fouth 1-25.
However when I use the random integer function and have the spreadsheet
calculate the solutions it is off on many of the solutions.
In cell A1 I have the function lets say quot; quot;.
In cell B2 I have the upper limit for the integers
In cell B3 I have the lower limit for the integers
In cell B4 I have: =RAND()*(B$2-B$3) B$3
In cell K4 I have=B4 (this is the first number in my problem)
However when I use in cell AH4
=SUMPRODUCT(($A$1=quot; quot;)*($K4 $M4) ($A$1=quot;-quot;)*($K4-$M4) ($A$1=quot;Xquot;)*($B4*$C4) IF($M4lt;gt;quot;quot;,($A$1=quot;/quot;)*($K4/$M4),0))
The solution varies.
Thanks for your time.

Hi!

Hmmm.....

Depending on which operator is entered in A1 and if M4 is either empty or 0,
the results vary, but they are correct.

($B4*$C4)

Is that a typo? All other references are to M4.

Here's another (shorter) way to write your formula:

=IF(OR(M4={quot;quot;,0}),0,CHOOSE(MATCH(A1,{quot; quot;,quot;-quot;,quot;xquot;,quot;/quot;},0),B4 M4,B4-M4,B4*M4,B4/M4))

Biff

quot;JCaryquot; gt; wrote in message
...
gt;I am having all sorts of problems with my spreadsheet. I fixed some but I
gt; think the problem lies within the Rand() function.
gt; I want a spreadsheet (on one page) (what appears to the students) four
gt; columns of simple arithmetic problems.
gt; I want to be able to adjust the operation: -*/. And have the spreadsheet
gt; calculate the solutions.
gt; However I also want to be able to set a range of values such as the first
gt; column using numbers 1-10 the second 1-15 third 1-20 and fouth 1-25.
gt; However when I use the random integer function and have the spreadsheet
gt; calculate the solutions it is off on many of the solutions.
gt; In cell A1 I have the function lets say quot; quot;.
gt; In cell B2 I have the upper limit for the integers
gt; In cell B3 I have the lower limit for the integers
gt; In cell B4 I have: =RAND()*(B$2-B$3) B$3
gt; In cell K4 I have=B4 (this is the first number in my problem)
gt; However when I use in cell AH4
gt; =SUMPRODUCT(($A$1=quot; quot;)*($K4 $M4) ($A$1=quot;-quot;)*($K4-$M4) ($A$1=quot;Xquot;)*($B4*$C4) IF($M4lt;gt;quot;quot;,($A$1=quot;/quot;)*($K4/$M4),0))
gt; The solution varies.
gt; Thanks for your time.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()