Dec 21, 2011

I'm using Excel 2010.

A formula I am using is outputting "0" instead of the expected value. Upon evaluating the formula I realized that this was because some of the values - years, in this case - had quotes around them while others did not. Please see the image below for the screenshot of the evaluation.

These values - the years - are being evaluated in the following formula.

Code:

=SUM(

IF(inventory!$F$3:$R$3=$A3,

IF(inventory!$B$4:$B$56=$G$1,

IF(inventory!$D$4:$D$56=$G$2,

inventory!$F$4:$R$56))))

This formula references the following sheet (an excerpt from that sheet). You can also see the formulas found in the cells causing the problem.

*ABC5212/20/20102010Adjustments53*20112011543/17/20112011Carwen Printers559/9/20112011Adjustments569/9/20112011Copeland Printing

Spreadsheet FormulasCellFormulaB52=IF(A52="",C52,YEAR(A52))B53=IF(A53="",C53,YEAR(A53))

B54=IF(A54="",C54,YEAR(A54))B55=IF(A55="",C55,YEAR(A55))B56=IF(A56="",C56,YEAR(A56))

I suspect that the problem is being caused by the output of the formula in these cells. If I simply type in "2011" instead of using the formula in B52:B56, then the first formula in the code section above does not have a problem.

How I can reconcile this?

View 2 Replies
View Related