Changing text in other cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
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")
 
Of course the 1 should be a zero

=if(A1<0,"A1 is negative","Non Negative Text")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top