View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sarah (OGI) Sarah (OGI) is offline
external usenet poster
 
Posts: 128
Default show result of sum when summed cells are blank

(I hope I explain this ok without confusing everyone)

I have entered the formula below to do a sort of vlookup and sum calculation
from another worksheet. I've used 'iserror' to show blank where no values
appear, i.e. for rows where the vlookup criteria does not appear, I want the
cells with this formula to show as a blank.

However, the value of the cells used as part of the 'sum' might be blank,
and because of this, there is no result because of the iserror, but I still
want the cells to be added and the result displayed despite there being blank
cells within the calculation.

Have I overcomplicated what I am trying to achieve or am I just missing
something?

=IF(ISERROR(SUMPRODUCT(('PBH Update Sheet'!$A$4:$A$499=$A11)*SUM('PBH Update
Sheet'!S4+'PBH Update Sheet'!AG4+'PBH Update Sheet'!AU4+'PBH Update
Sheet'!BI4+'PBH Update Sheet'!BW4+'PBH Update Sheet'!CK4+'PBH Update
Sheet'!CY4+'PBH Update Sheet'!DM4))),"",IF(SUMPRODUCT(('PBH Update
Sheet'!$A$4:$A$499=$A11)*SUM('PBH Update Sheet'!S4+'PBH Update
Sheet'!AG4+'PBH Update Sheet'!AU4+'PBH Update Sheet'!BI4+'PBH Update
Sheet'!BW4+'PBH Update Sheet'!CK4+'PBH Update Sheet'!CY4+'PBH Update
Sheet'!DM4))=0,"",SUMPRODUCT(('PBH Update Sheet'!$A$4:$A$499=$A11)*SUM('PBH
Update Sheet'!S4+'PBH Update Sheet'!AG4+'PBH Update Sheet'!AU4+'PBH Update
Sheet'!BI4+'PBH Update Sheet'!BW4+'PBH Update Sheet'!CK4+'PBH Update
Sheet'!CY4+'PBH Update Sheet'!DM4))))