Sum based on date in another cell

S

sunsetsweete

Hi!

I am trying to make a formula where I add up dollar amounts based on which
rows have a certain date.

I have a spreadsheet where I keep track of my sales for the day and I want
to add up my total sales in different categories for each day. Each
transaction is in a row and is dated. I have the workbooks split up into
type of sale instead of date so I need to find a way to have excel choose the
amounts based on the date given in another cell in the row.

Anyone know how to do this?

Thanks in advance!
 
J

Jacob Skaria

Try SUMF()

The below formula in D1 sum the values in ColB if the date in ColA is same
as the date mentioned in C1

ColA colB ColC ColD
7/17/2009 2 7/19/2009 =SUMIF(A:A,C1,B:B)
7/18/2009 3
7/19/2009 5
7/20/2009 1
7/21/2009 10
7/22/2009 15

If this post helps click Yes
 
S

sunsetsweete

I get how that works, but the parts that I need to add together are on
multiple sheets. I don't know how to get it so that it lets me add them from
multiple sheets.
 
S

sunsetsweete

I get how that works, but the sums that I am trying to add are from multiple
pages. How do I sum from more than one page?

Thanks!
 
J

Jacob Skaria

With the below example data in 2 sheets named sheet1 and sheet2 ; try the
below formula..

=SUMPRODUCT(SUMIF(INDIRECT("'"& {"sheet1","sheet2"}
&"'!A:A"),C1,INDIRECT("'"& {"sheet1","sheet2"} &"'!B:B")))

You can used a named range of sheet names instead of the array {}. Try this
with dummy data and then change to suit your requirement


If this post helps click Yes
 
A

alexrs2k

sheet1
A B
Date Income
2/2/1919 11
1/2/1987 12
10/8/2003 13
4/19/2003 14

Sheet2
A B
Date Income
2/2/1919 5
1/2/1987 6
10/8/2003 7
4/19/2003 8

Sheet3
A B
Date Summary
2/2/1919 16.00
1/2/1987 18.00
10/8/2003 20.00
4/19/2003 22.00

under summary title I wrote this formula:
=SUM(VLOOKUP(A2,Sheet1!A2:B5,2,FALSE)+SUM(VLOOKUP(A2,Sheet2!A2:B5,2,FALSE)))
I hope this works for you. Thank you.
 

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