Returning a colored value in If function

E

ExcelQuestion

Hello all,

=CONCATENATE(IF(C9>1.15*D8,"SELL","
"),IF(AND((D8*1.15>=C9),(D8*1.05<=C9)),"HOLD","
"),IF(AND((D8*1.05>C9),(D8*0.95<=C9)),"APPROACHING BUY","
"),IF(C9<0.95*D8,"BUY"," "))

How can i return a bold red "Sell" for this function?
 
E

ExcelQuestion

Ok, can you help me with the conditional formatting? Where do i go, what do i
do?
 
R

Ray A

Format>Conditional Fromat>Cell Value is > Equals > Sell Click the format
button and select color red
HTH
 
B

B. R.Ramachandran

Hi,

I think that the CONCATENATE function in your formula is unnecessary for
doing what you want (unless you have some other reason for having it). It is
adding extraneous spaces (leading or trailing) to the results.
For example, it returns "SELL" as "SELL " (i.e., with 2 trailing spaces).
The following formula will do the job.

=IF(C9>1.15*D8,"SELL",IF(AND((D8*1.15>=C9),(D8*1.05<=C9)),"HOLD",IF(AND((D8*1.05>C9),(D8*0.95<=C9)),"APPROACHING BUY",IF(C9<0.95*D8,"BUY"," "))))

Anyway,

Click on the cell containing the formula (say, E9)
"Format" --> "Conditional Formatting" --> Click on the dropdown list under
"Condition 1" to "Formula Is" and enter one of the following formulas in the
bar:
=E9 = "SELL " (2 trailing spaces) [Change the 'E9' in the formula
appropriately]
=TRIM(E9)="SELL" (no space after SELL) [--- ,, ---]
Click "Format" button in the CF window, and select Font Style (bold) and
Color (Red).

Regards,
B. R. Ramachandran
 
Top