View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin Lars-Åke Aspelin is offline
external usenet poster
 
Posts: 30
Default sum of cells that correspond to non empty cells

On Sun, 9 Mar 2008 00:04:00 -0800, nada
wrote:

hello,
if i have two columns and i want to sum the values in each cell in each
column that correspond to a nonempty cell in the other column what should i
do?


One of serveral possibilities is to use the SUMPRODUCT function

=SUMPRODUCT(- - (A1:A100<""), B1:B100)

will sum the data for the first 100 rows of column B where the
corresponding cell i column A is non empty

Hope this helps.