Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default How to set up a formula that will give me both positive and neg. .

want to know how to setup a formula in excel that can be copied to all cells
and spit out negative and positive percentages depending on the data. For
example
5/10= 50%......I can get that, but I want a common formula that can produce
that AND 10/5= - 50%.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default How to set up a formula that will give me both positive and neg. .

Craig,
Give us an idea of what cells you areworking with ie A1/B2 and the formula
will be pretty simple.

"craig" wrote:

want to know how to setup a formula in excel that can be copied to all cells
and spit out negative and positive percentages depending on the data. For
example
5/10= 50%......I can get that, but I want a common formula that can produce
that AND 10/5= - 50%.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default How to set up a formula that will give me both positive and neg. .

10/5 is 200%. What rule determines that is -50%?

--
HTH

-------

Bob Phillips
"craig" wrote in message
...
want to know how to setup a formula in excel that can be copied to all

cells
and spit out negative and positive percentages depending on the data. For
example
5/10= 50%......I can get that, but I want a common formula that can

produce
that AND 10/5= - 50%.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default How to set up a formula that will give me both positive and neg. .

Hi,
If i understand correctly:

Say A2 and B2 are the cells
1- If you just want the negative formula:
= - A2/B2
2- If you want negative or positive formula based on a condition:
= IF( condition_for_positive, 1 , -1 ) * A2/B2
eg: say you want the percentage to be positive if A2 is greater than
1000, else negative.
= IF( A2 1000, 1 , -1) * A2 / B2
Another way is to use a cell, Say $A$1, to set the negative or positive
view:
The following shows positive if $A$1 is "p", else it shows negative:
=IF ($A$1="p" , 1 , -1) * A2/B2

3- Finally, and a bit different, if you want to show all NUMBERS as positive
or negative (all of them), based on the previous example:
= IF ($A$1="p" , 1 , -1) * abs(A2/B2)

I hope this helps,
Sebastien


"craig" wrote:

want to know how to setup a formula in excel that can be copied to all cells
and spit out negative and positive percentages depending on the data. For
example
5/10= 50%......I can get that, but I want a common formula that can produce
that AND 10/5= - 50%.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default How to set up a formula that will give me both positive and neg. .

Assuming data is in cells A2 and B2, the formula should be...
=IF(B2=A2,A2/B2,-B2/A2)
Hope this helps,
Gary Brown


"craig" wrote:

want to know how to setup a formula in excel that can be copied to all cells
and spit out negative and positive percentages depending on the data. For
example
5/10= 50%......I can get that, but I want a common formula that can produce
that AND 10/5= - 50%.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtracting positive amts from negative and positive from positive bwbmom Excel Worksheet Functions 3 February 12th 10 03:15 PM
Give RELEVANT responses to questions. DO NOT give usless list pmartin Excel Worksheet Functions 2 July 6th 06 06:08 PM
Formula to make Negative Values Positive & Positive Values Negative? mustard Excel Discussion (Misc queries) 4 September 26th 05 10:05 PM
What can I add to a vlookup formula to give me a 0 not #n/a Casper Excel Worksheet Functions 4 July 5th 05 05:32 AM
Trying to give a cell a formula Jan Nordgreen[_2_] Excel Programming 2 April 15th 04 02:14 AM


All times are GMT +1. The time now is 12:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"