ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Returning a colored value in If function (https://www.excelbanter.com/excel-discussion-misc-queries/51014-returning-colored-value-if-function.html)

ExcelQuestion

Returning a colored value in If function
 
Hello all,

=CONCATENATE(IF(C91.15*D8,"SELL","
"),IF(AND((D8*1.15=C9),(D8*1.05<=C9)),"HOLD", "
"),IF(AND((D8*1.05C9),(D8*0.95<=C9)),"APPROAC HING BUY","
"),IF(C9<0.95*D8,"BUY"," "))

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

Vacation's Over

Returning a colored value in If function
 
formula cannot do that but conditional formatting will.

"ExcelQuestion" wrote:

Hello all,

=CONCATENATE(IF(C91.15*D8,"SELL","
"),IF(AND((D8*1.15=C9),(D8*1.05<=C9)),"HOLD", "
"),IF(AND((D8*1.05C9),(D8*0.95<=C9)),"APPROAC HING BUY","
"),IF(C9<0.95*D8,"BUY"," "))

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


ExcelQuestion

Returning a colored value in If function
 
Ok, can you help me with the conditional formatting? Where do i go, what do i
do?

"Vacation's Over" wrote:

formula cannot do that but conditional formatting will.

"ExcelQuestion" wrote:

Hello all,

=CONCATENATE(IF(C91.15*D8,"SELL","
"),IF(AND((D8*1.15=C9),(D8*1.05<=C9)),"HOLD", "
"),IF(AND((D8*1.05C9),(D8*0.95<=C9)),"APPROAC HING BUY","
"),IF(C9<0.95*D8,"BUY"," "))

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


Ray A

Returning a colored value in If function
 
FormatConditional FromatCell Value is Equals Sell Click the format
button and select color red
HTH

"ExcelQuestion" wrote:

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

"Vacation's Over" wrote:

formula cannot do that but conditional formatting will.

"ExcelQuestion" wrote:

Hello all,

=CONCATENATE(IF(C91.15*D8,"SELL","
"),IF(AND((D8*1.15=C9),(D8*1.05<=C9)),"HOLD", "
"),IF(AND((D8*1.05C9),(D8*0.95<=C9)),"APPROAC HING BUY","
"),IF(C9<0.95*D8,"BUY"," "))

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


B. R.Ramachandran

Returning a colored value in If function
 
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(C91.15*D8,"SELL",IF(AND((D8*1.15=C9),(D8*1.0 5<=C9)),"HOLD",IF(AND((D8*1.05C9),(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


"ExcelQuestion" wrote:

Hello all,

=CONCATENATE(IF(C91.15*D8,"SELL","
"),IF(AND((D8*1.15=C9),(D8*1.05<=C9)),"HOLD", "
"),IF(AND((D8*1.05C9),(D8*0.95<=C9)),"APPROAC HING BUY","
"),IF(C9<0.95*D8,"BUY"," "))

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



All times are GMT +1. The time now is 10:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com