Conditional Summation

TI89isAWESOME

New Member
Joined
Jul 20, 2010
Messages
5
Hello all,

I am having a bit of trouble getting a conditional sum to work. I purchase stock from my employer on a biweekly basis, and I am trying to plot a line graph of the total value of the stock owned based on the amount I own on a given date and the share price on that date. I have the purchase information under a tab labeled "Stock Purchase" in a table with the headings "Effective Date" and "Transaction Shares".

The table in a separate tab labeled "Historical Value" has headings "Date" and "Shares Owned". Based on this "Date" column, I would like to sum only shares owned on or before that date in the "Transaction Shares" column using the "Effective Date" column as the limiting criteria.

The conditional sum wizard hasn't been much help and the formulas I have tried aren't much better. I have tried the following:

=SUMIF(TEST2.xlsm!Effective_Date,"<'Historical Value'!A21",TEST2.xlsm!Transaction_Shares)

and a =IF("date test", Sum(Dates), 0) formula that I've already deleted.

I think that part of the problem is that the information is contained in two different tabs; I'm not sure what to do about it. It may not even be the problem.

Any ideas would be much appreciated. Thank you VERY much for your time.

Bob
 

Some videos you may like

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Welcome to the Board.

Maybe try:

=SUMIF(TEST2.xlsm!Effective_Date,"<"&'Historical Value'!A21,TEST2.xlsm!Transaction_Shares)

You have to concatenate the less than sign with the cell reference.
 

TI89isAWESOME

New Member
Joined
Jul 20, 2010
Messages
5
Thank you VERY much, Mr. Poulsom. It worked like a charm. I didn't realize that only two of the three SUMIF components were necessary.

Bob
 

kpark91

Well-known Member
Joined
Jul 15, 2010
Messages
1,582
It's not.... all three are necessary.. I think you've missed the two 2 commas :)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,804
Messages
5,598,158
Members
414,214
Latest member
marketingnumbersguy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top