Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!

# need help with calculation in my spreadsheet array

Ron Edgerson
Greenhorn
Posts: 2
im currently making a spreadsheet that calculate user input and puts the row, column,values,total in the spreadsheet and im trying to store the formula in the cell but im having problems doing so can some one help me out??

heres my code:

Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15568
46
Welcome to the Ranch!

Can you explain in more detail what aspect of it you exactly have problems with? Do you get any error messages; if yes, then what exactly are the error messages? Does the program run, but doesn't it do what you expect - if yes, then how does what it actually does differ from what you expect?

Ron Edgerson
Greenhorn
Posts: 2
Ok so if does give me a error yet, nonetheless, here is my output:

Enter the Cell Column, Row, and Value:
a 0 3.4 b 0 3.4 + c 0
3.4 + 3.4 = 6.8

A B C D E F G
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
0 | 3.400 | 3.400 | 6.800 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
1 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
2 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
3 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
4 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
Enter to change the row and col:
A 0 2.333
2.333 + 3.4 = 5.7330000000000005

A B C D E F G
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
0 | 2.333 | 3.400 | 6.800 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
1 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
2 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
3 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
4 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|

Now i ask the user to input column, row number, value, and then column two, row number 2, value two, operator, and then store the total in the cell specified. which it does store the correct total in the first prompt, but when i ask the user to change the value in column A , row 0 , the new value is store but the total will not change ( which it suppose to change from 6.8 to 5.7).
im not sure how to get the new total to store??