Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
can someone please tell me what i did wrong with this if statement?
On Nov 12, 2:11 pm, unclescrooge wrote:
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. You have to tell excel, that "P" is a string: =IF(C3="P",o3*9/P3,0) hth Carlo |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
can someone please tell me what i did wrong with this if statement?
On Nov 11, 11:25 pm, carlo wrote:
On Nov 12, 2:11 pm, unclescrooge wrote: 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. You have to tell excel, that "P" is a string: =IF(C3="P",o3*9/P3,0) hth Carlo- Hide quoted text - - Show quoted text - ah that explains it. i didn't think of that. thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What's wrong with this if statement? | Excel Discussion (Misc queries) | |||
IF Statement help please - again - got it wrong last time! | Excel Worksheet Functions | |||
If Then statement in macro gone wrong | Excel Programming | |||
wts wrong with this statement | Excel Worksheet Functions | |||
What is wrong with this IF statement? need help. | Excel Discussion (Misc queries) |