# Conditional Summation

#### TI89isAWESOME

##### New Member
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

### Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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.

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

It's not.... all three are necessary.. I think you've missed the two 2 commas

Replies
1
Views
506
Replies
0
Views
496
Replies
2
Views
529
Replies
1
Views
1K
Replies
1
Views
579

1,211,678
Messages
6,103,242
Members
447,848
Latest member
holale

### 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?

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