Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like the text in one cell to change if the value
of another cell becomes negative. How can I get that to happen? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
something along the lines of Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1")) Is Nothing Then If Target.Value < 0 Then Range("b1").Value = "a1 is negative" Else Range("b1").Value = "a1 is positive" End If End If End Sub --- this needs to go in the sheet module of the sheet that you working on (right mouse click on the sheet tab, choose view code & paste the code there) Hope this helps Cheers JulieD "Excel ProgrammingMe" <Excel wrote in message ... I'd like the text in one cell to change if the value of another cell becomes negative. How can I get that to happen? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=if(A1<1,"A1 is negative","Non Negative Text")
-- Regards, Tom Ogilvy "Excel ProgrammingMe" <Excel wrote in message ... I'd like the text in one cell to change if the value of another cell becomes negative. How can I get that to happen? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the cell where the text should appear, you can use an IF formula. For
example: =IF(B2<0,"Value is negative","Value is positive") Excel ProgrammingMe wrote: I'd like the text in one cell to change if the value of another cell becomes negative. How can I get that to happen? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Of course the 1 should be a zero
=if(A1<0,"A1 is negative","Non Negative Text") -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... =if(A1<1,"A1 is negative","Non Negative Text") -- Regards, Tom Ogilvy "Excel ProgrammingMe" <Excel wrote in message ... I'd like the text in one cell to change if the value of another cell becomes negative. How can I get that to happen? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change the text in the legend of a chart w/o changing pivot text | Charts and Charting in Excel | |||
Graph while ignoring text but not changing text to #NA | Charts and Charting in Excel | |||
changing text in multiple cells by pattern | Excel Discussion (Misc queries) | |||
Changing several cells text color | Excel Discussion (Misc queries) | |||
Change a cells text by another cell changing. | Excel Programming |