I've built a workbook to keep up with purchase/sales of Stocks, to keep
up with long amp; short term Capital/Gains for Tax records.
The way that the sheet is built is: A1 thru G2 are used for entering
stock purchases; name, date bought, price, # of shares with sum formula
for quot;Total Investment Amount (G2)quot;. Cells H2 thru L2 are used when the
Stock is sold (Sale date, number of stocks, price and quot;Total Investment
Amount(L2)quot;). The last cell, M2, I want to use to show the Capital
Gain/Loss for that stock sale.
My problem or question is that I don't want Cell M2 to sum unless L2
has value of gt;0. I've tried the =SUMIF formula and I can't it to work.
I can't seem to find a formula that would work.
Any suggestions?
Thanks in advance,
Ron--
Ron Woolley
------------------------------------------------------------------------
Ron Woolley's Profile: www.excelforum.com/member.php...oamp;userid=30904
View this thread: www.excelforum.com/showthread...hreadid=505977just a normal if i think,=if(L2gt;0,sum formula(),quot;quot;)
--
paul
remove nospam for email addy!
quot;Ron Woolleyquot; wrote:
gt;
gt; I've built a workbook to keep up with purchase/sales of Stocks, to keep
gt; up with long amp; short term Capital/Gains for Tax records.
gt;
gt; The way that the sheet is built is: A1 thru G2 are used for entering
gt; stock purchases; name, date bought, price, # of shares with sum formula
gt; for quot;Total Investment Amount (G2)quot;. Cells H2 thru L2 are used when the
gt; Stock is sold (Sale date, number of stocks, price and quot;Total Investment
gt; Amount(L2)quot;). The last cell, M2, I want to use to show the Capital
gt; Gain/Loss for that stock sale.
gt;
gt; My problem or question is that I don't want Cell M2 to sum unless L2
gt; has value of gt;0. I've tried the =SUMIF formula and I can't it to work.
gt; I can't seem to find a formula that would work.
gt;
gt; Any suggestions?
gt; Thanks in advance,
gt; Ron
gt;
gt;
gt; --
gt; Ron Woolley
gt; ------------------------------------------------------------------------
gt; Ron Woolley's Profile: www.excelforum.com/member.php...oamp;userid=30904
gt; View this thread: www.excelforum.com/showthread...hreadid=505977
gt;
gt;
=SUMIF(L2:L200,quot;gt;0quot;,M2:M200)
--
HTH
Bob Phillips
(remove nothere from the email address if mailing direct)
quot;Ron Woolleyquot; gt;
wrote in message
...
gt;
gt; I've built a workbook to keep up with purchase/sales of Stocks, to keep
gt; up with long amp; short term Capital/Gains for Tax records.
gt;
gt; The way that the sheet is built is: A1 thru G2 are used for entering
gt; stock purchases; name, date bought, price, # of shares with sum formula
gt; for quot;Total Investment Amount (G2)quot;. Cells H2 thru L2 are used when the
gt; Stock is sold (Sale date, number of stocks, price and quot;Total Investment
gt; Amount(L2)quot;). The last cell, M2, I want to use to show the Capital
gt; Gain/Loss for that stock sale.
gt;
gt; My problem or question is that I don't want Cell M2 to sum unless L2
gt; has value of gt;0. I've tried the =SUMIF formula and I can't it to work.
gt; I can't seem to find a formula that would work.
gt;
gt; Any suggestions?
gt; Thanks in advance,
gt; Ron
gt;
gt;
gt; --
gt; Ron Woolley
gt; ------------------------------------------------------------------------
gt; Ron Woolley's Profile:
www.excelforum.com/member.php...oamp;userid=30904
gt; View this thread: www.excelforum.com/showthread...hreadid=505977
gt;
Thanks everyone for the ideas.
I finally got the formula to work.
I was placing the () in the wrong place.
the final formula that worked in instance was:
*=IF(L2gt;0,SUM(L2-G2),0)* and in the cells that I have formatted as
Accounting, if l2 =$0.00 M2 comes back with $ -. If l2 is gt;0, then it
will come back as $100.00 (Gain) and ($100.00), which is what I was
looking for.
I knew I was close, but... just looking at it too long...or it could be
that I was brain dead..
Ron--
Ron Woolley
------------------------------------------------------------------------
Ron Woolley's Profile: www.excelforum.com/member.php...oamp;userid=30904
View this thread: www.excelforum.com/showthread...hreadid=505977
- Aug 28 Tue 2007 20:39
summing formula
close
全站熱搜
留言列表
發表留言