![]() |
Postive # converted to Negative #
I want to be able to enter a positive # in a cell and have it display as a
negative? Help |
Postive # converted to Negative #
Hi,
select the range, custom format, enter "-"0.0 that will do the trick "2MShad" wrote: I want to be able to enter a positive # in a cell and have it display as a negative? Help |
Postive # converted to Negative #
On Dec 3, 2:43*pm, 2MShad wrote:
I want to be able to enter a positive # in a cell and have it display as a negative? Help You can create this sub in the sheet (go to Tools-Macro-Visual Basic Editor and double click the sheet: Private Sub Worksheet_Change(ByVal Target As Range) For Each T In Target If IsNumeric(T.Value) Then If T.Value 0 Then T.Value = -T.Value End If End If Next End Sub |
Postive # converted to Negative #
Thanks, that was simple.
"Eduardo" wrote: Hi, select the range, custom format, enter "-"0.0 that will do the trick "2MShad" wrote: I want to be able to enter a positive # in a cell and have it display as a negative? Help |
Postive # converted to Negative #
Be aware that the number is still positive.
All you did was change the display, not the value. Do not rely on these for calculations. Gord Dibben MS Excel MVP On Thu, 3 Dec 2009 13:19:02 -0800, 2MShad wrote: Thanks, that was simple. "Eduardo" wrote: Hi, select the range, custom format, enter "-"0.0 that will do the trick "2MShad" wrote: I want to be able to enter a positive # in a cell and have it display as a negative? Help |
Postive # converted to Negative #
On Dec 4, 5:00*pm, Gord Dibben <gorddibbATshawDOTca wrote:
Be aware that the number is still positive. All you did was change the display, not the value. Do not rely on these for calculations. Gord Dibben *MS Excel MVP On Thu, 3 Dec 2009 13:19:02 -0800, 2MShad wrote: Thanks, *that was simple. "Eduardo" wrote: Hi, select the range, custom format, enter "-"0.0 that will do the trick "2MShad" wrote: I want to be able to enter a positive # in a cell and have it display as a negative? Help- Hide quoted text - - Show quoted text - How do you figure that it did not change the value? T.Value = -T.Value It looks like it changed the value to me and some simple tests confirm it. |
Postive # converted to Negative #
Formatting a number does not change the value of the inputted number.
Enter 1 to 10 in A1:A10 Format as "-"0.0 to display these as negative. In D1 enter =SUM(A1:A10) Format D1 as Number or General I will re-state...............do not rely on the formatted display for calculations,. Gord On Mon, 7 Dec 2009 07:44:21 -0800 (PST), zxcv wrote: On Dec 4, 5:00*pm, Gord Dibben <gorddibbATshawDOTca wrote: Be aware that the number is still positive. All you did was change the display, not the value. Do not rely on these for calculations. Gord Dibben *MS Excel MVP On Thu, 3 Dec 2009 13:19:02 -0800, 2MShad wrote: Thanks, *that was simple. "Eduardo" wrote: Hi, select the range, custom format, enter "-"0.0 that will do the trick "2MShad" wrote: I want to be able to enter a positive # in a cell and have it display as a negative? Help- Hide quoted text - - Show quoted text - How do you figure that it did not change the value? T.Value = -T.Value It looks like it changed the value to me and some simple tests confirm it. |
Postive # converted to Negative #
On Dec 7, 2:16*pm, Gord Dibben <gorddibbATshawDOTca wrote:
Formatting a number does not change the value of the inputted number. Enter 1 to 10 in A1:A10 Format as *"-"0.0 *to display these as negative. In D1 enter *=SUM(A1:A10) Format D1 as Number or General I will re-state...............do not rely on the formatted display for calculations,. Gord On Mon, 7 Dec 2009 07:44:21 -0800 (PST), zxcv wrote: On Dec 4, 5:00*pm, Gord Dibben <gorddibbATshawDOTca wrote: Be aware that the number is still positive. All you did was change the display, not the value. Do not rely on these for calculations. Gord Dibben *MS Excel MVP On Thu, 3 Dec 2009 13:19:02 -0800, 2MShad wrote: Thanks, *that was simple. "Eduardo" wrote: Hi, select the range, custom format, enter "-"0.0 that will do the trick "2MShad" wrote: I want to be able to enter a positive # in a cell and have it display as a negative? Help- Hide quoted text - - Show quoted text - How do you figure that it did not change the value? * *T.Value = -T.Value It looks like it changed the value to me and some simple tests confirm it.- Hide quoted text - - Show quoted text - Fair enough. My method however DID change the value. Your method may be preferable in the OP's case if they did not want the value to change or if they did not want to have a macro. |
All times are GMT +1. The time now is 07:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com