Microsoft Excel - Sum Value returns 0

Asked By Shincy
03-Aug-11 01:06 AM
When I try to sum a range of cells, the value returns 0. All my cell values are in number format only

Shincy
  Ravi S replied to Shincy
03-Aug-11 01:10 AM
HI
try this

The Excel COUNT function will count cells that contain numbers. Its syntax is:

    =COUNT(value1, value2,...value30). 

The arguments (e.g. value1) can be cell references, or values typed into the Excel COUNT formula.

The following Excel COUNT function example uses one argument -- a reference to cells A1:A5.

  1. Enter the sample data on your worksheet
  2. In cell A7, enter an Excel COUNT formula, to count the numbers in column A:   =COUNT(A1:A5)  
  3. Press the Enter key, to complete the formula.
  4. The result will be 3, the number of cells that contain numbers.
    Cell A1 isn't counted, because it contains text.

Note: Since dates are stored as numbers, the Excel COUNT function will include any cells that contain dates.

View the steps in a short Excel Count Functions video 
(COUNT, COUNTA, COUNTBLANK)  

Download zipped sample
Excel COUNT workbook

Excel Count Function

  Vickey F replied to Shincy
03-Aug-11 01:11 AM
first check that, the range which you are using , in that range is there any non numeric data present.

If yes then you will get 0.
  James H replied to Shincy
03-Aug-11 01:11 AM
SUMIF Syntax

=SUMIF(range,criteria,sum_range)

=SUMIF(A1:A10,">20",B1:B10)

Which would SUM all numeric cells in the range
B1:B20 where the corresponding row in A1:A10 was greater than 20. If we ommit the last optional argument (sum_range) the SUMIF would sum all cells in the range A1:A10 which are greater than 20, i.e.

=SUMIF(A1:A10,">20")


Note the criteria argument is in the form of a number, expression, or text that defines which cells will be summed. For example, criteria can be expressed as 20, "20", "=20",  ">20", "North", "N*".

Ok, so if we need to sum a range of cells where corresponding cells (on the same row) meet 2, or more conditions we can no longer use the SUMIF. The formulas we can use, in order of their efficiency, are


1) DSUM Download advanced examples of DSUM

2) SUMPRODUCT
3) SUM with and IF function nested and entered as an array formula. See Array Formulas for details

For all examples I will use the data as shown below. Where
A2:E25 has been named: DataTable



DSUM

Adds the numbers in a column of a list, or database, that match criteria you specify. For example;

=DSUM(DataTable,B2,Criteria)

Would Sum all cells in
B2:B25 that meet the criteria is the named range: Criteria (shown below)



The top row of the range: Criteria has exact copies of the headings in the range DataTable . The reference to cell
B2 is telling the DSUM to sum the numbers in B2:B25 that meet the criteria. We could replace the reference to B2 with the text "Quantity", or the number 2 as the "Quantity" column is the second column in the table.

The criteria text "Bourbon" and "Vodka", under the criteria table heading "Description", tells DSUM that either "Bourbon" OR "Vodka" is a match. The same principle is used for the "Alcohol Content", i.e. "High" OR "Low". This is then seen by DSUM as an OR condition.

Note the repeat of the date under "Use By Date". This is needed when using more than 2 rows as the criteria as a blank cell is seen as a wildcard character. If we wanted to sum only data that lies between 2 dates, we would need have 2 "Use By Date" headings in our Criteria range and use: >7-Apr-2005 below one of these headings and <7-Jun-2005 under another. This is then seen by DSUM as an AND condition.

Download advanced examples of DSUM

SUMPRODUCT

Multiplies corresponding values in the given arrays, and returns the sum of those products=SUMPRODUCT((A3:A25="Vodka")*(C3:C25>VALUE("7-Apr-2005"))*(E3:E25="High")*(B3:B25))+SUMPRODUCT((A3:A25="Bourbon")*(C3:C25>VALUE("7-Apr-2005"))*(E3:E25="Low")*(B3:B25))

As with the first DSUM example, the above SUMPRODUCT example would sum all "Quantity" values where the corresponding "Use By Date" is greater than 7-Apr-2005, the "Description" is either "Vodka" OR "Bourbon" and the "Alcohol Content" is "High" OR "Low".

Note how range for each column of the table Start s at row 3 and not row 2. This is because the SUMPRODUCT has the result of each criteria check returned as TRUE (has a value of 1) or FALSE (has a value of 0). So, in the first row check (if we used row 2) it would look like;
=SUMPRODUCT(0)*(0))*(0)*("Quantity"))+SUMPRODUCT((0)*(0)*(0)*("Quantity"))To read about this in detail, see our April edition of our free Excel Newsletter

The result of multiplying a text string is always #VALUE! This would cause the result of the SUMPRODUCT to return the #VALUE! error.

SUM and IF=SUM(IF(A2:A25="Bourbon",IF(C2:C25>VALUE("7-Apr-2005"),IF(E2:E25="Low",B2:B25)))+SUM(IF(A2:A25="Vodka",IF(C2:C25>VALUE("7-Apr-2005"),IF(E2:E25="High",B2:B25)))))

The above, does the same as the SUMPRODUCT example. However, this is an array formula and must be entered by pushing Ctrl+Shift+Enter
  Ravi S replied to Shincy
03-Aug-11 01:12 AM
HI

try this

If you insert a row directly above the Excel SUM function in the previous example, the new row may not be included in the SUM. It may continue to sum cells A1:A4, and ignore A5.

To ensure that new rows are included in the total, you can use the OFFSET function with the Excel SUM function.
  1. Select cell A5.
  2. Enter the following formula:
       =SUM(A1:OFFSET(A5,-1,0))
  3. Press the Enter key to complete the entry.
  4. Insert a row above row 5
  5. Type a number in cell A5, and it will be included in the total in cell A6
Excel Sum Function OFFSET
refer the links alsop
http://www.contextures.com/xlFunctions01.html
  Riley K replied to Shincy
03-Aug-11 01:15 AM
First check that the format of the cells to make sure that it is general or number format.

First, it's =SUM, not @SUM. I suspect that even if the cells are formatted as numbers they're still there as text. You can verify this in a few ways:

 Select the column(s) the values are in that you're adding up, and widen the column and use Format/Cells/Alignment/General -- if they're really #s, then they will be aligned on the right, otherwise left. If they're aligned on the left, they're numbers as text.

Easiest way to make them "real" #s is to select a blank cell, edit/copy, select the numbers, edit/paste special/Values AND Add.

Make sure to check these
  Pichart Y. replied to Shincy
03-Aug-11 01:17 AM
Hi Shincy,

Try this...
  1) copy any blank cell
  2) drag mouse on you range
  3) right click select paste special select Values and Multiply

See here if the sum is correct, it means that your previous value are not number

to change them to be number go to menu > Data > Text to columns > will popup the "Converse to text to column wizard..." 
  select Delimeted > next > select tab > next > Click the column in that popup window> select General > finish

Hope this help.

Pichart Y.
Create New Account
help
Count Functions Excel Hi Everyone i am looking for a formula that would let me count the number of cells with a value between zero and 15? is there something that would work. . . Thanks Excel Worksheet Discussions Microsoft Excel (1) Excel 2003 (1) Word (1) Application.CountIf (1) SUMPRODUCT (1) SUBSTITUTE (1) FREQUENCY (1) Worksheet (1 ISNUMBER(A1:A100)), - -(A1:A100> = 0), - -(A1:A100< = 15)) Although COUNTIF is best. - - Biff Microsoft Excel MVP And even this CSE way. . . = SUM(- -(ABS(A1:A1000-7.5)<7.5)) CSE
Excel Count Functions Excel I am trying to count the number of cells in a row that contain one or more of three letters? Excel Worksheet Discussions Microsoft Excel (1) Excel (1) SUBSTITUTE (1) SUMPRODUCT (1) TRANSPOSE (1) ISNUMBER (1) ISERROR (1) COUNTIF (1) I am
ForEach using Excel functions Excel Hi, Excel 2003. Although reasonably au fait with VLookup function, I can't get it to do of data to compare the fields, however is it possible to achieve this task using Excel functions alone? From trawling through the newsgroup I suspect I may need the Index and Match functions, but haven't been able to accomplish it! Thanks in advance Simon Excel Discussions Microsoft Excel (1) Excel 2003 (1) Excel (1) SUMPRODUCT (1) COUNTIF (1) INDEX (1
Excel Count Functions Windows 7 How do I count the number of cells in a row containing one or more of three lettters? Live Discussions Windows XP (1) Windows Server (1) Windows Vista (1) Office (1) Excel (1) Gasbag (1) Lettters (1) Tfl (1) In message <EF5C1029-1752-4DED-BA7A-29D4569CFD33@microsoft these groups / forums might assist you better. Thomas - - Thomas Lee (tfl@psp.co.uk) keywords: Excel, Count, Functions description: How do I count the number of cells in a row containing one or
Arguments Count Function problem Excel Hi everybody I have 33 Count functions : = COUNT(B46;B47;B48;B49;B50;B51;B52;B53;B54;B55;B56;B57;B58;B62;B63), = COUNT(C46;C47;C48;C49;C50;C51;C52;C53;C54;C55;C56;C57;C58;C62;C63), . . . . . . . . . . . . . . . . . . . . = COUNT(AH46;AH47;AH48;AH49;AH50;AH51;AH52;AH53;AH54;AH55;AH56;AH57;AH58;AH62;AH63 How must look this function to have the same rows number , but to count 33 columns , from B to AH ?? This 33 functions , can be in only one ?? Please