Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i change the colours of my pie graph? Shane Devenshire Charts and Charting in Excel 0 March 5th 09 11:58 PM
Colours of cells change Matt Excel Discussion (Misc queries) 0 January 28th 09 10:40 AM
Tracked changes - change highlight colours Nelson Mather Excel Discussion (Misc queries) 0 November 20th 07 12:12 PM
Change the default chart colours TonyJD Charts and Charting in Excel 2 January 20th 05 01:06 AM
VBA to change chart colours Newbie Excel Programming 3 August 9th 04 12:41 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"