ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   formatting the Cell color directly in an IF formula (https://www.excelbanter.com/excel-worksheet-functions/221042-formatting-cell-color-directly-if-formula.html)

daniel ron

formatting the Cell color directly in an IF formula
 
Hi all,
I have the problem to format a cell directly within an IF Formula.
I think I have seen once something similar to IF (A1<10; [red]ok;
[yellow]NOK), so without using a conditional formatting.
Can any of You help me or let me know I am crazy?
thank You in advance
Daniel

Simon Lloyd[_93_]

formatting the Cell color directly in an IF formula
 

As far as i know you can't use that notation to colour a cell in a an IF
formula, you would have to use conditional formatting or use code for a
SELECT CASE statement in the worksheet change or calculation event.

daniel ron;230774 Wrote:
Hi all,
I have the problem to format a cell directly within an IF Formula.
I think I have seen once something similar to IF (A1<10; [red]ok;
[yellow]NOK), so without using a conditional formatting.
Can any of You help me or let me know I am crazy?
thank You in advance
Daniel



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=64489


Shane Devenshire[_2_]

formatting the Cell color directly in an IF formula
 
Hi,

You saw correctly. Here is an example:

[<10][Red]"OK";[Yellow]"NOK"

Select the cells to format. To set this up choose Format, Cells, Number
tab, Custom and enter the above on the Type line.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"daniel ron" wrote:

Hi all,
I have the problem to format a cell directly within an IF Formula.
I think I have seen once something similar to IF (A1<10; [red]ok;
[yellow]NOK), so without using a conditional formatting.
Can any of You help me or let me know I am crazy?
thank You in advance
Daniel



All times are GMT +1. The time now is 09:00 AM.

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