Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing text in other cells

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Changing text in other cells

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Changing text in other cells

=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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Changing text in other cells

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Changing text in other cells

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change the text in the legend of a chart w/o changing pivot text msp Charts and Charting in Excel 2 December 17th 08 08:53 PM
Graph while ignoring text but not changing text to #NA haruun Charts and Charting in Excel 1 April 29th 08 01:49 AM
changing text in multiple cells by pattern forxigan Excel Discussion (Misc queries) 4 February 19th 08 08:53 AM
Changing several cells text color lauras03 Excel Discussion (Misc queries) 1 March 12th 07 11:03 PM
Change a cells text by another cell changing. Mike L.[_2_] Excel Programming 1 May 21st 04 10:23 PM


All times are GMT +1. The time now is 11:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"