Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Subtracting positive amts from negative and positive from positive | Excel Worksheet Functions | |||
Give RELEVANT responses to questions. DO NOT give usless list | Excel Worksheet Functions | |||
Formula to make Negative Values Positive & Positive Values Negative? | Excel Discussion (Misc queries) | |||
What can I add to a vlookup formula to give me a 0 not #n/a | Excel Worksheet Functions | |||
Trying to give a cell a formula | Excel Programming |