PC Review


Reply
Thread Tools Rate Thread

can someone please tell me what i did wrong with this if statement?

 
 
unclescrooge
Guest
Posts: n/a
 
      12th Nov 2007
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.

 
Reply With Quote
 
 
 
 
carlo
Guest
Posts: n/a
 
      12th Nov 2007
On Nov 12, 2:11 pm, unclescrooge <johnchamp...@gmail.com> 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

 
Reply With Quote
 
unclescrooge
Guest
Posts: n/a
 
      12th Nov 2007
On Nov 11, 11:25 pm, carlo <carlo.ramu...@gmail.com> wrote:
> On Nov 12, 2:11 pm, unclescrooge <johnchamp...@gmail.com> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone tell me what is wrong with this IIf statement =?Utf-8?B?TnVubyBCZW50bw==?= Microsoft Access 3 31st Oct 2007 02:16 PM
Where is the If statement going wrong? =?Utf-8?B?Sm9hbm5l?= Microsoft Access VBA Modules 5 26th Sep 2006 07:48 PM
Just can't see what's WRONG with this SQL statement?? Jack G Microsoft Access Getting Started 2 11th Jun 2006 06:24 PM
What's wrong with this IIF statement ? =?Utf-8?B?YWxiZXJ0?= Microsoft Access Forms 7 27th Mar 2006 05:31 AM
What is wrong with my SQL Statement =?Utf-8?B?QWx2aW4=?= Microsoft Access Queries 3 6th Jun 2005 08:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:06 AM.