I have a list of values which are positive or negative depending on a D or C
value in the cell next to them. I need to turn the D values to negatives in
order to sum the data
Are your values manually entered, or results of a formula? If manually
entered, then you'll probably need to insert a new column and then use this
formula:
For this example, I'm assuming Column A holds D or C info, and Column B
holds your values. This formula would then be entered in Column C.
=IF(A1=quot;Dquot;,-B1,B1)
But if your values are the results of a formula, then you could most likely
incorporate the above logic into the existing formula to avoid using an
additional column.
HTH,
Elkarquot;Paula1quot; wrote:
gt; I have a list of values which are positive or negative depending on a D or C
gt; value in the cell next to them. I need to turn the D values to negatives in
gt; order to sum the data
How about summing them without changing anything
=SUM(IF(B1:B10=quot;Dquot;,-A1:A10,A1:A10))
which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;Paula1quot; gt; wrote in message
...
gt; I have a list of values which are positive or negative depending on a D or
C
gt; value in the cell next to them. I need to turn the D values to negatives
in
gt; order to sum the data
or even
=SUMIF(B1:B10,quot;Cquot;,A1:A10)-SUMIF(B1:B10,quot;Dquot;,A1:A10)--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
View this thread: www.excelforum.com/showthread...hreadid=515965yeah ... good :-)
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;daddylonglegsquot; gt;
wrote in message
...
gt;
gt; or even
gt;
gt; =SUMIF(B1:B10,quot;Cquot;,A1:A10)-SUMIF(B1:B10,quot;Dquot;,A1:A10)
gt;
gt;
gt; --
gt; daddylonglegs
gt; ------------------------------------------------------------------------
gt; daddylonglegs's Profile:
www.excelforum.com/member.php...oamp;userid=30486
gt; View this thread: www.excelforum.com/showthread...hreadid=515965
gt;
- Aug 07 Thu 2008 20:45
how to turn positive to negative values in excel
close
全站熱搜
留言列表
發表留言