Quantcast
Channel: Apache OpenOffice Community Forum
Viewing all articles
Browse latest Browse all 1281

Calc • Writing a formula to Calculate correctly

$
0
0
Stonehenge
I am trying to calculate a batting average based on game entries and I am having some issues.
Basic formula is Hits/AtBats and returns a number to the third digit after the decimal.
Column A Column B Column C I am using =SUM(($B$1:B4)/($A$1:A4)) and I am not getting a correct result.

Code:

   At Bats     Hits           .Avg    4               2            .500   should be 2/4 = .500  this works    5               2            .400   should be 4/9 = .444  why is it returning .400??     4               2            .500   should be 6/13= .462  why is it returning .500??    4               0            .000   should be 6/17= .353  why is it returning .000??
Am I using the wrong formula or function?? I wrote the formula with the $ so I could copy it down say 150 lines to calucate a running batting average through out the season but I can't get the second line to come out right! Is their something wrong with using the ":" range specifier?? Is their a different way to write this to get the correct result? I am using OpenOffice 4.1.15 on Windows 10 (22H2). If I get this to work I am going to use it for 3 other columns that display the result as .### (On Base Percentage, OPS and Slug).

Statistics: Posted by Stonehenge — Wed May 01, 2024 12:12 pm



Viewing all articles
Browse latest Browse all 1281

Trending Articles