ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using If Statements to change colours (https://www.excelbanter.com/excel-programming/307413-using-if-statements-change-colours.html)

b_dhan

Using If Statements to change colours
 
hi everyone I was wondering if someone could help me out with a simple excel
sheet that i have programmed to keep my stocks upto date. The problem I have
is that I have data that refreshes continuiously and its numbers so i want to
be able to detect if its a loss or gain right away. I was wondering if there
is some sort of If Statement to help me change colour of background colour
for the cell or the text in the cell which automatically refreshes positve or
negative numbers.
Hope somebody understands what I'm saying and hopefully there is a easy to
moderate way of doing becuase im not a professional with this program.
THANKS and hope to hear from you soon.

sebastienm

Using If Statements to change colours
 
You can use the excel feature called Conditional Formating.
Assuming you have numbers in A1:A10 and want he background to be Green if
the number is less than 0.5, Red otherwise.
- Select cell A1:A10
- Menu Format Conditional Formating. The Cond Formatting dialog pops up:
- for the first condition, choose 'CellValueIs' 'LessThan' '0.5'
- click the Format button and a specific Font/Border/or Pattern, say
Green pattern. then click OK
- click Add to add a second condition
- choose 'CellValueIs' 'GreaterThanOrEqualTo' '0.5'
- click the Format and choose Red pattern. click ok
- click OK
Now enter number (around 0.5) into these cells.

Regards,
Sebastien
- click the Format

"b_dhan" wrote:

hi everyone I was wondering if someone could help me out with a simple excel
sheet that i have programmed to keep my stocks upto date. The problem I have
is that I have data that refreshes continuiously and its numbers so i want to
be able to detect if its a loss or gain right away. I was wondering if there
is some sort of If Statement to help me change colour of background colour
for the cell or the text in the cell which automatically refreshes positve or
negative numbers.
Hope somebody understands what I'm saying and hopefully there is a easy to
moderate way of doing becuase im not a professional with this program.
THANKS and hope to hear from you soon.



All times are GMT +1. The time now is 07:37 PM.

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