4 Replies Latest reply: Dec 20, 2010 2:29 PM by pw1840
Level 1 (45 points)
How would I make a field calculate On Base Percentage (Baseball) IE: add singles, doubles, triples, home runs and walks then divide by number of plate appearances. This should give me a percent which I want to round to the third decimal point IE: .411. What do you think?
• ###### 1. Re: Numbers: How to make a cell that calculates On Base Percentage
Level 3 (840 points)
Paul,

That would do it. By the way, I think "hit by pitch" is also included in your sum. If you line up the "on base" stats in successive columns you could use: =sum(D : I)/A where A is the total "at bats".

You would, however, probably like to see your percents as ".411" rather than "0.411" which is what you'll get after you divide the two numbers. A way around this is to convert the result to text:

=IF(ISBLANK(A2),"",IF(OR(B2="",B2=0,SUM(C2:H2)=0),".000",IF(SUM(C2:H2)=B2,"1.000 ",(MID(SUM(C2:H2)/B2&"00",2,4)))))

pw

• ###### 2. Re: Numbers: How to make a cell that calculates On Base Percentage
Level 1 (45 points)
Thanks alot!
• ###### 3. Re: Numbers: How to make a cell that calculates On Base Percentage
Level 1 (45 points)
That worked awesome!
• ###### 4. Re: Numbers: How to make a cell that calculates On Base Percentage
Level 3 (840 points)
Paul,

Thanks. But I just remembered that "on base by error" is another item to be included in the sum. If it's a consideration in your league and you want to include it you can easily insert the column before "hit by pitch". The formulas will adjust automatically if you insert it somewhere within the "sum" range. Hope I haven't forgotten other possibilities. Best wishes,

pw