Hybrid vlookup - sum function

E

Emeryville John

Hi,

I have two tables that each have 2 columns. The first column in the first
table is composed of dates that are in ascending order, but have some
duplicate dates and missing dates. The second column has numbered values. The
first column in the second a table is all dates 1/1/08 to present. I want the
second column to be an output of a function. The first part of the function
is easy and would find a date in the first table and return the corresponding
column 2 value. The tricky part is that when there are two dates, or more
than one, then I want the output be the sum of the column 2 values. Does this
make sense? Thanks for your help.

John
 
P

Peo Sjoblom

=SUMIF($A$2:$A$100=D2,$B$2:$B$100)


where A2:B100 is the first table that you want to total and D2 is the first
cell in the second table

copy down
--


Regards,


Peo Sjoblom
 
D

Dave Peterson

Typo alert:

=SUMIF($A$2:$A$100,D2,$B$2:$B$100)

(equal sign changed to a comma)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top