Hi Joseph ,
I have used the IFERROR function , which is available in Excel 2007 and later versions.
Since you have Excel 2003 , what you can do is use the ISERROR function ; however , the formula will become longer.
Suppose we have the following formula :
=A1/B1
When B1 is 0 , the above formula will give a #DIV/0! error.
We can revise our formula using an IF function to take care of the error as follows :
=IF(B1=0,0,A1/B1)
Another option is to use the IFERROR function as follows :
=IFERROR(A1/B1,0)
In case you do not have the IFERROR function in your version of Excel , you can use the ISERROR function as follows :
=IF(ISERROR(A1/B1),0,A1/B1)
What is clear is that the portion A1/B1 has to be repeated.
In your formula , the portion to be repeated is quite lengthy ; so repeating it will make the formula even longer.
Try the following array formula , to be entered using CTRL SHIFT ENTER :
=SUM(IF(IF(ISERROR(LOOKUP(ROW('Look Data -Pivot Table'!$A$1:$A$306),IF('Look Data -Pivot Table'!$A$1:$A$306<>"",ROW('Look Data -Pivot Table'!$A$1:$A$306)))),0,LOOKUP(ROW('Look Data -Pivot Table'!$A$1:$A$306),IF('Look Data -Pivot Table'!$A$1:$A$306<>"",ROW('Look Data -Pivot Table'!$A$1:$A$306))))=MATCH($A21,'Look Data -Pivot Table'!$A$1:$A$306,0),IF($A22='Look Data -Pivot Table'!$B$1:$B$306,OFFSET('Look Data -Pivot Table'!$C$1:$C$306,,COLUMN(B19)-COLUMN(Result!$B19)))))
You will need to change the items in BOLD when you copy it down.
Narayan