ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF (https://www.excelbanter.com/excel-discussion-misc-queries/159848-if.html)

Malik

IF
 
I hve a formula in a cell. Is it possible that I format the cell in such a
way that if the value comes to 5, the background color changes automatically?

Thanks

T. Valko

IF
 
You can do this with conditional formatting. How to do it depends on what
version of Excel you're using.

For versions prior to Excel 2007:

Select the cell in question. Let's assume this is cell A1
Goto the menu FormatConditional Formatting
Select Formula Is
Enter this formula in the box on the right:

=AND(ISNUMBER(A1),A15)

Click the Format button
Select the Patterns tab
Select the desired fill color
OK your way out

--
Biff
Microsoft Excel MVP


"Malik" wrote in message
...
I hve a formula in a cell. Is it possible that I format the cell in such a
way that if the value comes to 5, the background color changes
automatically?

Thanks




Malik

IF
 
thx valco,
really appreciate ur help. what if the cell colour to be formatted (a1 in ur
ex) is text dependent?

"T. Valko" wrote:

You can do this with conditional formatting. How to do it depends on what
version of Excel you're using.

For versions prior to Excel 2007:

Select the cell in question. Let's assume this is cell A1
Goto the menu FormatConditional Formatting
Select Formula Is
Enter this formula in the box on the right:

=AND(ISNUMBER(A1),A15)

Click the Format button
Select the Patterns tab
Select the desired fill color
OK your way out

--
Biff
Microsoft Excel MVP


"Malik" wrote in message
...
I hve a formula in a cell. Is it possible that I format the cell in such a
way that if the value comes to 5, the background color changes
automatically?

Thanks





T. Valko

IF
 
Then you use a different formula.

=A1="text"

Where "text" is the string you want to test for. For example:

=A1="apples"

Or, if you want to compare 2 cells:

B1 = apples

Then:

=AND(A1<"",B1<"",A1=B1)

--
Biff
Microsoft Excel MVP


"Malik" wrote in message
...
thx valco,
really appreciate ur help. what if the cell colour to be formatted (a1 in
ur
ex) is text dependent?

"T. Valko" wrote:

You can do this with conditional formatting. How to do it depends on what
version of Excel you're using.

For versions prior to Excel 2007:

Select the cell in question. Let's assume this is cell A1
Goto the menu FormatConditional Formatting
Select Formula Is
Enter this formula in the box on the right:

=AND(ISNUMBER(A1),A15)

Click the Format button
Select the Patterns tab
Select the desired fill color
OK your way out

--
Biff
Microsoft Excel MVP


"Malik" wrote in message
...
I hve a formula in a cell. Is it possible that I format the cell in such
a
way that if the value comes to 5, the background color changes
automatically?

Thanks








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

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