Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB - turning cells specified colours

How can I make cells turn a specified colour if certain criteria i
met.

for example if,
-1015+1015 = exactly 0, Cell turns green
else if
-1015+number = anything execpt 0, Cell turns red.

Any ideas

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default VB - turning cells specified colours

Have you looked at conditional formatting? I don't know how many different
scenarios you have. Conditional formatting only supports three.

"Fraggs " wrote in message
...
How can I make cells turn a specified colour if certain criteria is
met.

for example if,
-1015+1015 = exactly 0, Cell turns green
else if
-1015+number = anything execpt 0, Cell turns red.

Any ideas?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default VB - turning cells specified colours

Does it have to be with VB code ? Conditional formatting (Format menu) is
far easier.

Why are so many newsgroup postings channeled through Excelforum saying "any
ideas?" by the way ?
--
HTH. Best wishes Harald
Followup to newsgroup only please

"Fraggs " skrev i melding
...
How can I make cells turn a specified colour if certain criteria is
met.

for example if,
-1015+1015 = exactly 0, Cell turns green
else if
-1015+number = anything execpt 0, Cell turns red.

Any ideas?


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB - turning cells specified colours

I have 3 scenarios, 0, <0 and =0
0, <0 = Red cells

=0 = Green cells

got a link I could look at

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB - turning cells specified colours

Take a look at "conditional formating". You should be
able to accomplish what you want.

Byron

-----Original Message-----
How can I make cells turn a specified colour if certain

criteria is
met.

for example if,
-1015+1015 = exactly 0, Cell turns green
else if
-1015+number = anything execpt 0, Cell turns red.

Any ideas?


---
Message posted from http://www.ExcelForum.com/

.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB - turning cells specified colours

First format your cells to be green.

Then select your cells then from the Format menu, choose Conditional
formatting. Set up the first format with Not Equal To 0 and then click
the format button and select Red.

It's pretty self-explanatory.

K


---
Message posted from http://www.ExcelForum.com/

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB - turning cells specified colours

Why are so many newsgroup postings channeled through Excelforum saying
"any ideas"?


Huh? I just said any ideas at the end cos I was clueless and it leaves
the question more open than saying, only people who deffinatly know how
to solve this answer me. I'm open to all and any suggestions.


---
Message posted from http://www.ExcelForum.com/

  #8   Report Post  
Posted to microsoft.public.excel.programming
VDM VDM is offline
external usenet poster
 
Posts: 2
Default VB - turning cells specified colours

In Excel

Click on Format

Conditional Formatting

Set your first condition.

Click Add

Set your second condition.

Click Add

Set your third condition.

Click OK



"Fraggs " wrote in message
...
I have 3 scenarios, 0, <0 and =0
0, <0 = Red cells

=0 = Green cells

got a link I could look at?


---
Message posted from http://www.ExcelForum.com/



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
Turning N/A cells to blank Cells amik Excel Worksheet Functions 4 May 26th 09 07:30 PM
turning N/A cells to blank Cells amik Excel Worksheet Functions 0 May 26th 09 07:14 PM
turning a string of cells into a work shift (eg. 9am-7pm) jbmjbj Excel Worksheet Functions 0 January 28th 08 12:41 AM
auto-expansion of excel cells, turning it off dan00500 Excel Discussion (Misc queries) 2 May 21st 07 06:55 PM
Excel 2003 font colours and cell colours bretta Excel Discussion (Misc queries) 1 April 17th 05 03:45 AM


All times are GMT +1. The time now is 05:51 PM.

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

About Us

"It's about Microsoft Excel"