View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Totaling Different Cell Values

I'm having a little trouble figuring out how to total some values. The
basis
of the worksheet is that I have different sections that each have a tota
valuel but then I want to find the overall total of all the sections'
totals.

This is the basis of it
------ $
------ $
------ $
Total X
------ $
------ $
------ $
Total X

Overall Total ?

I want to add all the x's but not do it manually, I want it to search for
the word Total and add up all the values of the cell across from any cell
that contains the word Total. I was trying to do it with a vlookup but I
screwed that up.


Give this a try...

=SUMPRODUCT((B1:B100="Total")*(D1:D100))

where I assumed the word "Total" was in column B and the values were in
column D and that the range covered rows 1 thru 100.

Rick