How can I get A7 to say something like =IF(B4<0, *(-1)), and include the rest of the formula? If it's greater than 0, don't change it. Also, how do I get G4 to be a positive number? Thanks.
How can I get A7 to say something like =IF(B4<0, *(-1)), and include the rest of the formula? If it's greater than 0, don't change it. Also, how do I get G4 to be a positive number? Thanks.
Last edited by FDibbins; 06-09-2016 at 01:58 AM.
Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem - not what you think the answer might be. (think google search terms?). Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the address bar)
Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?
To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
(note: this change is not optional)
(you pretty much already have your answer with what you showed)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Not really sure what you are trying to calc here, or where you want the formula (G4?), but maybe something like this...
=IF(B4<0, -your formula,your formula)
to get a pos value, use =ABS(your formula)
Here is the formula: =IF((B4<0), ((E4/B4)*100)+D3, (B4*E4)/100-D3). How can I get it to read "if any result is negative, multiply by (-1).
If I try to put (-1) anywhere in the formula, it totally changes the result. Not sure if there's such thing as If within an If???
Just wrap the whole formula in the ABS function
=ABS(IF(B4<0,E4/B4*100+D3,B4*E4/100-D3))
Last edited by Jonmo1; 06-09-2016 at 10:08 PM.
Thanks, that worked!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks