My formula returns a result but the cell displays a zero?

G

Guest

I have a simple formula subtracting one cell from another using =SUM(XX,
-XX). When I click on fx and bring up the function arguments box, the
formula result is displayed correctly in that box. However, the cell
containing the formula will only display a zero. I have tried reformatting
the cells to no avail. I have also tried getting a result using =XX-XX and
that does not work either.
 
J

John Michl

According to your formula, you are subtracting something (XX) from
itself (XX) which will always equal zero. Out of curiosity, why use
the SUM function. Isn't it easier to just type the equation such as...

= A1 - A2

- John Michl
 
V

via135

hi
try
=SUM(XX,(-XX)


-via135


Excel said:
I have a simple formula subtracting one cell from another using
=SUM(XX,
-XX). When I click on fx and bring up the function arguments box, the
formula result is displayed correctly in that box. However, the cell
containing the formula will only display a zero. I have tried
reformatting
the cells to no avail. I have also tried getting a result using =XX-XX
and
that does not work either.
 
G

Guest

You might get better responses if you post the following

1. Values of Referenced Cells
2. Formula you are using
3. Actual Result
4. Desired Result

Example:
A1: 34
B1: 12
C1: =SUM(A1-B1)
outputs 6, but is supposed to output 22.

In which case I would tell you to check the formats of each cell, and ask
you why you were using the SUM function.
 
G

Guest

I did try that and it still return a zero value in the actual cell, although
as before, if I open the function arguments pop up box, the correct value is
listed there.
Any other ideas why a function result would display correctly in the
arguments box but a completely different number display in the cell itself?
 
G

Guest

The XX's were just examples and I have tried it the way you suggested below
with the same result:
=C60-C238 still displays a $0.00 in the cell although the actual result is
$6,709.48
 
P

PCLIVE

Is there any special number formatting in your cell. Try setting it to
General. Right-click cell, select 'Format Cells'. On the Number tab, set
to General.
Any change?

Paul
 
J

John Michl

Sounds like a formating issue. Click the cell that doesn't display
correctly then clear the formatting via Edit > Clear > Formats.

If you see the number, try reformatting.

- John Michl
 
G

Gord Dibben

Format to General as PCLIVE suggests.

However, this by itself will not do the trick because the numbers are text.

After formatting to Generql, copy a blank cell then select your other cells and
Paste Special>Add>OK>Esc.

This forces them to numbers.


Gord Dibben MS Excel MVP
 
G

Guest

Hi

I'm having exactly the same problem, although with a slightly more
complicated formula. The formula is this: SUMIF('July
06'!$K$3:$K$36,'Report'!$A$24,'July 06'!$R$3:$R$36), the idea being to get a
sum of column R if the name in A24 appears in column K. The only result this
formula is displaying is 0, but in the arguments box it gives the correct
answer of 43. adding, subtracting, dividing etc. anything to this cell gives
a result of 0, eg formula + 10 will show 0, dividing something by this
result, instead of showing div/0 will show 0. I've tried every format
available, copied it to different cells etc, but will only display the 0
result. Any ideas other than what's been mentioned?

Thanks
 
G

Guest

Hi

I'm having exactly the same problem, although with a slightly more
complicated formula. The formula is this: SUMIF('July
06'!$K$3:$K$36,'Report'!$A$24,'July 06'!$R$3:$R$36), the idea being to get a
sum of column R if the name in A24 appears in column K. The only result this
formula is displaying is 0, but in the arguments box it gives the correct
answer of 43. adding, subtracting, dividing etc. anything to this cell gives
a result of 0, eg formula + 10 will show 0, dividing something by this
result, instead of showing div/0 will show 0. I've tried every format
available, copied it to different cells etc, but will only display the 0
result. Any ideas other than what's been mentioned?

Thanks
 
W

Wayne

I've got EXACTLY the same problem, with a very similar formula:

=SUM(IF('BLOW OUT PREVENTER MD (BOPMD)'!$O$4:$O$289=3,IF('BLOW OUT PREVENTER
MD (BOPMD)'!$N$4:$N$289="VISUAL",1,0)))

Formula is to count how many items on that worksheet equal both # in column
O and "VISUAL" in column N.

Odd thing - it works in the table above it, but copying the formula and
changing the worksheet name in the formula make it read "0" in the answer,
where in the table above it (same formula but calculating a different
worksheet) DOES work. And, identically to Aaron's problem, when you look at
the formula arguments box it HAS the correct answer - but it only displays in
the cell.

I've tried re-formatting it 9 ways from Sunday - nothing seems to have any
effect. It's driving me crazy - I've got a LOT of these worksheets and
calculations to do, and some work, some don't...

Wayne
 
W

Wayne

One more thing I've noticed... in the cells where the formula works, if I
click on the cell then the is surrounded by "{ }", but in the cells where it
doesn't work, those brackets are not there. However, if I add those brackets
manually to the formula in the cell where it does NOT work, it then displays
the formula in the cell, not the result (or even "0")
 
R

Rick Rothstein \(MVP - VB\)

Those curly-braces mean the formula in an array-entered formula. This kind
of formula requires you to commit it using Ctrl+Shift+Enter, not just Enter
by itself. Select one of the cells without the curly-braces, click in the
Formula Bar and then press Ctrl+Shift+Enter... doing this should make the
formula work (unless you have made a modification that is incorrect). Once
you have an array-entered formula in place, you can copy it down or across
normally.

Rick
 
W

Wayne

Rick,

Thank you EVER SO VERY MUCH!! That worked... I thought I was going to go
bald trying to figure it out (pulling my hair out...).

I truly appreciate it....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top