Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
I know this is probably an easy one, but I can't find the right
button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
The Event macro performs this action for cell B9:
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = Target.Value & "-" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub modify it to change or include more cells. -- Gary''s Student - gsnu2007 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
Sorry - use this version instead:
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = -Target.Value & "+" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub -- Gary''s Student - gsnu200746 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
On Sep 24, 7:28 pm, Gary''s Student
wrote: Sorry - use this version instead: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = -Target.Value & "+" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub -- Gary''s Student - gsnu200746 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. Huh? I have no clue what you are talking about. Is there a simple button to click to change this or something. Ic an't believe something as simple as typing in a negative number would cause such a glitch. |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
As coded this only works on cell B9. Even though it look complicated, its not:
1. right-click the tab name at the bottom of Excel 2. select View Code this open a VBA window 3. paste my stuff in 4. close the VBA window play around with entering positive and negative values in B9. If you are nervious about VBA, just try it out on a fresh new workbook first. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 24, 7:28 pm, Gary''s Student wrote: Sorry - use this version instead: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = -Target.Value & "+" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub -- Gary''s Student - gsnu200746 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. Huh? I have no clue what you are talking about. Is there a simple button to click to change this or something. Ic an't believe something as simple as typing in a negative number would cause such a glitch. |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
On Sep 27, 12:44 am, Gary''s Student
wrote: As coded this only works on cell B9. Even though it look complicated, its not: 1. right-click the tab name at the bottom of Excel 2. select View Code this open a VBA window 3. paste my stuff in 4. close the VBA window play around with entering positive and negative values in B9. If you are nervious about VBA, just try it out on a fresh new workbook first. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 24, 7:28 pm, Gary''s Student wrote: Sorry - use this version instead: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = -Target.Value & "+" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub -- Gary''s Student - gsnu200746 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. Huh? I have no clue what you are talking about. Is there a simple button to click to change this or something. Ic an't believe something as simple as typing in a negative number would cause such a glitch. What is VBA? And does this mean that everyone is used to typing in a minus and a number in a cell and having it NOt automatically be a negative number?t |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
You are correct.
If you select a cell, say L11, and enter -3 you will see: -3 in the cell. However you wanted to see: 3+L11 in the cell. This means making the negative number into a positive number and then appending the cell address to that positive number. That is what the VBA macro does. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 27, 12:44 am, Gary''s Student wrote: As coded this only works on cell B9. Even though it look complicated, its not: 1. right-click the tab name at the bottom of Excel 2. select View Code this open a VBA window 3. paste my stuff in 4. close the VBA window play around with entering positive and negative values in B9. If you are nervious about VBA, just try it out on a fresh new workbook first. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 24, 7:28 pm, Gary''s Student wrote: Sorry - use this version instead: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = -Target.Value & "+" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub -- Gary''s Student - gsnu200746 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. Huh? I have no clue what you are talking about. Is there a simple button to click to change this or something. Ic an't believe something as simple as typing in a negative number would cause such a glitch. What is VBA? And does this mean that everyone is used to typing in a minus and a number in a cell and having it NOt automatically be a negative number?t |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
On Sep 28, 2:06 am, Gary''s Student
wrote: You are correct. If you select a cell, say L11, and enter -3 you will see: -3 in the cell. However you wanted to see: 3+L11 in the cell. This means making the negative number into a positive number and then appending the cell address to that positive number. That is what the VBA macro does. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 27, 12:44 am, Gary''s Student wrote: As coded this only works on cell B9. Even though it look complicated, its not: 1. right-click the tab name at the bottom of Excel 2. select View Code this open a VBA window 3. paste my stuff in 4. close the VBA window play around with entering positive and negative values in B9. If you are nervious about VBA, just try it out on a fresh new workbook first. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 24, 7:28 pm, Gary''s Student wrote: Sorry - use this version instead: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = -Target.Value & "+" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub -- Gary''s Student - gsnu200746 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. Huh? I have no clue what you are talking about. Is there a simple button to click to change this or something. Ic an't believe something as simple as typing in a negative number would cause such a glitch. What is VBA? And does this mean that everyone is used to typing in a minus and a number in a cell and having it NOt automatically be a negative number?t I think you have it backwards. I type -3 into cell L11 and what appears in the cell is "-3+D14" or whatever cell my cursor happens to be sitting on. I just want to see -3 in cell L11. Surely I can do this without learning VBA , no? |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
You are once again correct. If L11 is empty and you click on it and type:
-3 it should display: -3 without any VBA. If it does not display: -3 we can fix it. Remove the VBA and try the entry. What do you see?? What do you want to see?? -- Gary''s Student - gsnu2007 "nickra" wrote: On Sep 28, 2:06 am, Gary''s Student wrote: You are correct. If you select a cell, say L11, and enter -3 you will see: -3 in the cell. However you wanted to see: 3+L11 in the cell. This means making the negative number into a positive number and then appending the cell address to that positive number. That is what the VBA macro does. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 27, 12:44 am, Gary''s Student wrote: As coded this only works on cell B9. Even though it look complicated, its not: 1. right-click the tab name at the bottom of Excel 2. select View Code this open a VBA window 3. paste my stuff in 4. close the VBA window play around with entering positive and negative values in B9. If you are nervious about VBA, just try it out on a fresh new workbook first. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 24, 7:28 pm, Gary''s Student wrote: Sorry - use this version instead: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = -Target.Value & "+" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub -- Gary''s Student - gsnu200746 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. Huh? I have no clue what you are talking about. Is there a simple button to click to change this or something. Ic an't believe something as simple as typing in a negative number would cause such a glitch. What is VBA? And does this mean that everyone is used to typing in a minus and a number in a cell and having it NOt automatically be a negative number?t I think you have it backwards. I type -3 into cell L11 and what appears in the cell is "-3+D14" or whatever cell my cursor happens to be sitting on. I just want to see -3 in cell L11. Surely I can do this without learning VBA , no? |
#10
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
On Sep 28, 7:41 pm, Gary''s Student
wrote: You are once again correct. If L11 is empty and you click on it and type: -3 it should display: -3 without any VBA. If it does not display: -3 we can fix it. Remove the VBA and try the entry. What do you see?? What do you want to see?? -- Gary''s Student - gsnu2007 "nickra" wrote: On Sep 28, 2:06 am, Gary''s Student wrote: You are correct. If you select a cell, say L11, and enter -3 you will see: -3 in the cell. However you wanted to see: 3+L11 in the cell. This means making the negative number into a positive number and then appending the cell address to that positive number. That is what the VBA macro does. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 27, 12:44 am, Gary''s Student wrote: As coded this only works on cell B9. Even though it look complicated, its not: 1. right-click the tab name at the bottom of Excel 2. select View Code this open a VBA window 3. paste my stuff in 4. close the VBA window play around with entering positive and negative values in B9. If you are nervious about VBA, just try it out on a fresh new workbook first. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 24, 7:28 pm, Gary''s Student wrote: Sorry - use this version instead: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = -Target.Value & "+" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub -- Gary''s Student - gsnu200746 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. Huh? I have no clue what you are talking about. Is there a simple button to click to change this or something. Ic an't believe something as simple as typing in a negative number would cause such a glitch. What is VBA? And does this mean that everyone is used to typing in a minus and a number in a cell and having it NOt automatically be a negative number?t I think you have it backwards. I type -3 into cell L11 and what appears in the cell is "-3+D14" or whatever cell my cursor happens to be sitting on. I just want to see -3 in cell L11. Surely I can do this without learning VBA , no? I do not see -3 in cell L11. I see "-3+D5" (D5 being where my cursor just happens to sit and if I move my cursor more cell numbers will be added.) So, how do I remove the VBA. Didn't even know I had it or what it is, really. |
#11
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
Any VBA we inserted is NOT needed and should be removed:
Right-click the tab name at the bottom of the Excel window and select: View Code This brings up a VBA window. If you see a macro in the pane, erase it and close the VBA window. -- Gary''s Student - gsnu2007 "nickra" wrote: On Sep 28, 7:41 pm, Gary''s Student wrote: You are once again correct. If L11 is empty and you click on it and type: -3 it should display: -3 without any VBA. If it does not display: -3 we can fix it. Remove the VBA and try the entry. What do you see?? What do you want to see?? -- Gary''s Student - gsnu2007 "nickra" wrote: On Sep 28, 2:06 am, Gary''s Student wrote: You are correct. If you select a cell, say L11, and enter -3 you will see: -3 in the cell. However you wanted to see: 3+L11 in the cell. This means making the negative number into a positive number and then appending the cell address to that positive number. That is what the VBA macro does. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 27, 12:44 am, Gary''s Student wrote: As coded this only works on cell B9. Even though it look complicated, its not: 1. right-click the tab name at the bottom of Excel 2. select View Code this open a VBA window 3. paste my stuff in 4. close the VBA window play around with entering positive and negative values in B9. If you are nervious about VBA, just try it out on a fresh new workbook first. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 24, 7:28 pm, Gary''s Student wrote: Sorry - use this version instead: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = -Target.Value & "+" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub -- Gary''s Student - gsnu200746 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. Huh? I have no clue what you are talking about. Is there a simple button to click to change this or something. Ic an't believe something as simple as typing in a negative number would cause such a glitch. What is VBA? And does this mean that everyone is used to typing in a minus and a number in a cell and having it NOt automatically be a negative number?t I think you have it backwards. I type -3 into cell L11 and what appears in the cell is "-3+D14" or whatever cell my cursor happens to be sitting on. I just want to see -3 in cell L11. Surely I can do this without learning VBA , no? I do not see -3 in cell L11. I see "-3+D5" (D5 being where my cursor just happens to sit and if I move my cursor more cell numbers will be added.) So, how do I remove the VBA. Didn't even know I had it or what it is, really. |
#12
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
On Sep 29, 10:06 pm, Gary''s Student
wrote: Any VBA we inserted is NOT needed and should be removed: Right-click the tab name at the bottom of the Excel window and select: View Code This brings up a VBA window. If you see a macro in the pane, erase it and close the VBA window. -- Gary''s Student - gsnu2007 "nickra" wrote: On Sep 28, 7:41 pm, Gary''s Student wrote: You are once again correct. If L11 is empty and you click on it and type: -3 it should display: -3 without any VBA. If it does not display: -3 we can fix it. Remove the VBA and try the entry. What do you see?? What do you want to see?? -- Gary''s Student - gsnu2007 "nickra" wrote: On Sep 28, 2:06 am, Gary''s Student wrote: You are correct. If you select a cell, say L11, and enter -3 you will see: -3 in the cell. However you wanted to see: 3+L11 in the cell. This means making the negative number into a positive number and then appending the cell address to that positive number. That is what the VBA macro does. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 27, 12:44 am, Gary''s Student wrote: As coded this only works on cell B9. Even though it look complicated, its not: 1. right-click the tab name at the bottom of Excel 2. select View Code this open a VBA window 3. paste my stuff in 4. close the VBA window play around with entering positive and negative values in B9. If you are nervious about VBA, just try it out on a fresh new workbook first. -- Gary''s Student - gsnu200747 "nickra" wrote: On Sep 24, 7:28 pm, Gary''s Student wrote: Sorry - use this version instead: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Value 0 Then Exit Sub v = -Target.Value & "+" Application.EnableEvents = False Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False) Application.EnableEvents = True End Sub -- Gary''s Student - gsnu200746 "nickra" wrote: I know this is probably an easy one, but I can't find the right button. Every time I type, say, -3, into a cell, it turns into -3 and then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in the cell instead of -3. What do I need to do? It's gotta be simple, I know. Huh? I have no clue what you are talking about. Is there a simple button to click to change this or something. Ic an't believe something as simple as typing in a negative number would cause such a glitch. What is VBA? And does this mean that everyone is used to typing in a minus and a number in a cell and having it NOt automatically be a negative number?t I think you have it backwards. I type -3 into cell L11 and what appears in the cell is "-3+D14" or whatever cell my cursor happens to be sitting on. I just want to see -3 in cell L11. Surely I can do this without learning VBA , no? I do not see -3 in cell L11. I see "-3+D5" (D5 being where my cursor just happens to sit and if I move my cursor more cell numbers will be added.) So, how do I remove the VBA. Didn't even know I had it or what it is, really. What is a Macro? When I open op the view code, I get three windows. The larger one says, a variety of things depending on what pull down tab I use. Examples: Private Sub Worksheet_Activate() End Sub Private Sub Worksheet_Calculate() End Sub Private Sub Worksheet_Change(ByVal Target As Excel.Range) End Sub Private Sub Worksheet_Deactivate() End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) End Sub Do I delete any of this or what? Astonished this takes so much just to type a negative number in a cell. |
#13
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
I think this is just one big misunderstanding
Does this happen when you type in -3 and press enter or do you use the arrow keys? -- Regards, Peo Sjoblom Do I delete any of this or what? Astonished this takes so much just to type a negative number in a cell. |
#14
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
On Sep 30, 3:16 pm, "Peo Sjoblom" wrote:
I think this is just one big misunderstanding Does this happen when you type in -3 and press enter or do you use the arrow keys? -- Regards, Peo Sjoblom Do I delete any of this or what? Astonished this takes so much just to type a negative number in a cell. I hit enter. |
#15
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Negative number morphing to a cell code
Do you have anything in autocorrect that changes a minus sign to something
else? -- Regards, Peo Sjoblom "nickra" wrote in message oups.com... On Sep 30, 3:16 pm, "Peo Sjoblom" wrote: I think this is just one big misunderstanding Does this happen when you type in -3 and press enter or do you use the arrow keys? -- Regards, Peo Sjoblom Do I delete any of this or what? Astonished this takes so much just to type a negative number in a cell. I hit enter. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
cell to show ' 0 ' , or nothing at all, if the sum is a negative number | Excel Worksheet Functions | |||
How to make the cell or font color red if the number is negative? | Excel Worksheet Functions | |||
make cell entries a negative number | New Users to Excel | |||
2003= negative number&2004= negative number How Do I Calculate gro | Excel Worksheet Functions | |||
how to change the state of a number in a cell from negative to po. | Excel Discussion (Misc queries) |