Your question, your audience. Choose who sees your identity—and your question—with question security.

Is there a simple formula for figuring this out, the sum of the rows? See below for further explanation:

A B C D

S 825.2 1 3/1/2011 14:34

B 824.8 1 3/1/2011 14:35

B 821.2 1 3/1/2011 14:41

S 821.1 1 3/1/2011 14:41

The above columns show trading contracts.

Column A is S or B, meaning short or long. An S contract is a negative amount and a B contract is a positive amount.

Column B is the contract value.

Column C is the quantity of contracts traded

Column D is the date and doesn't matter for this calculation.

If the formula is working correctly, I would be able to select rows 1 and 2 and apply the formula and get a sum of 4 in Column E

A B C D

S 825.2 1 3/1/2011 14:34

B 824.8 1 3/1/2011 14:35

B 821.2 1 3/1/2011 14:41

S 821.1 1 3/1/2011 14:41

The above columns show trading contracts.

Column A is S or B, meaning short or long. An S contract is a negative amount and a B contract is a positive amount.

Column B is the contract value.

Column C is the quantity of contracts traded

Column D is the date and doesn't matter for this calculation.

If the formula is working correctly, I would be able to select rows 1 and 2 and apply the formula and get a sum of 4 in Column E

=10*(-1*SUMPRODUCT((A1:A2=

Next thing, I am pretty excel ignorant, so how do I apply the formulat? I copy/pasted it into E, row 2 and get a -4, but am finding that any row I paste it, it gives the same answer, so I am assuming I am applying the formula incorrectly. Do I need to insert it somewhere? I am using MS Office 2007.

=SUMPRODUCT((A$1:A2={"S","

regards, barry

2011-03-01-1731.png

Nevermind that last, now getting this. Think we are closer....

2011-03-01-1736.png

2011-03-01-1736.png

I think your formula is working, as row 24 is correct, I was up 30 at that time. Not sure what to make of the number that appears on every odd row in Column E

=IF(SUM(COUNTIF(A$1:A2,{"S

regards, barry

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.

=IF(SUM(COUNTIF(A$1:A2,{"S

regards, barry