View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elaine Elaine is offline
external usenet poster
 
Posts: 106
Default Need help with Adding Decimals

I want to count the number of times a specific string occurs in a row. Then
I want to add whole numbers and decimals. Ex:

Cells B1, B4, B5, and B10 contain the letter "W". Each "W" counts as 1 for
a total of 4. Cell B13 contains the string "S.5". I want to this item to
count as a half or .5. The Sum of B1:B13 = 4.5

Problem: I can't get "S.5" to count as .5. I'm using the following formula
to count each occurrence and then give me a total number of all cells:
=COUNTIF(B8:AF8,"S")+(COUNTIF(B8:AF8,"DF"))+(COUNT IF(B8:AF8,"C"))+(COUNTIF(B8:AF8,"W"))+(COUNTIF(B8: AF8,"S.5"))

Is there a way to include an automatic .5 without actually subtracting it
from the end of the string? EX:
=COUNTIF(B8:AF8,"S")+(COUNTIF(B8:AF8,"DF"))+(COUNT IF(B8:AF8,"C"))+(COUNTIF(B8:AF8,"W"))+(COUNTIF(B8: AF8,"S.5"))-.5
--
Thanks for your help!

Elaine