View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
unclescrooge unclescrooge is offline
external usenet poster
 
Posts: 5
Default can someone please tell me what i did wrong with this if statement?

hi,

this is for keeping baseball stats. i basically want to insert into
the spreadsheet to calculate ERA if the player's position (C3) = P
(for pitcher) otherwise insert a zero.

=IF(C3=P,O3*9/P3,0)

O3 = number of earned runs
P3 = number of innings pitched

i did something similar to calculate batting average,

=IF(D2=0,0,E2/D2)

where D2= at bats
E2= hits

and that one seems to work just fine.