How to change text in a cell based on value i

August 13, 2011 at 10:49:10
Specs: Windows XP
Basically I am trying to conditional format in Excel a cell -say A40 with text in it which should say "Net Profit" if the value in Cell D40 is greater than zero and the text in A40 should automatically change to "Net (Loss)" if the value in D40 changes to less than zero. Any help will be highly appreciated.

See More: How to change text in a cell based on value i

Report •


#1
August 13, 2011 at 14:55:44
First, some terminology...

Conditional formatting is used to change the format of a cell when the specified condition(s) is(are) TRUE. Thus the name Conditional formatting.

You are asking for the contents (not the format) of the cell to change based on the value in another cell.

That is done with a basic IF function, which you can find in the Excel Help files.

However, you left out a condition. You didn't tell us what you want to display if D40 equals 0 - assuming that that is possible.

What should be displayed in A40 if D40 = 0?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
August 14, 2011 at 03:03:44
Sorry my problem appeared to be half explained. The text in cell A40 should say "Net Profit" if the value in D40 changes to zero or greater.

Report •

#3
August 14, 2011 at 06:01:39
What you need is a very basic IF function.

Look up the IF function in the Excel Help files. If you have any problems, come on back with what you've tried and and we'll see what suggestions we can offer.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Related Solutions

#4
August 14, 2011 at 09:11:14
Thanks DerbyDad03, I have figured it out in the IF function. Actually even if Cell D40=0 (or greater) the contents of the Cell A40 remains the same i.e. "Net Profit".
Thanks for correcting my terminology and for your time.

Report •


Ask Question