Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default formula for changing cell color


hello,

Does anybody know a formula for changing cell color's within a certai
range?

regards,
nie

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default formula for changing cell color


Try:

Range("B5:B10").Interior.ColorIndex = vbYello

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default formula for changing cell color

The constant vbYellow is an RGB Long and would only be used with the color
property
Range("B5:B10").Interior.Color = vbYellow

vbYellow has a value of 65535

color indexes for specific colors are 1 to 56

yellow is colorindex 6

Range("B5:B10").Interior.ColorIndex = 6


--
Regards,
Tom Ogilvy



"gocush" wrote in message
...

Try:

Range("B5:B10").Interior.ColorIndex = vbYellow


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default formula for changing cell color


In Conditional format you can sepecify if the cell is greater than 0
which would then give you a true value to change the colour of the
cell.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default formula for changing cell color

I have a page on Conditional Formatting there is not VBA involved.
http://www.mvps.org/dmcritchie/excel/condfmt.htm

C.F. has a limit of checking 3 conditions per cell, beyond that you
probably want to use an event macro which are installed differently
than regular macros..
http://www.mvps.org/dmcritchie/excel/event.htm#case

The big advantage of a conditional format is that it doesn't matter
how the value got changed:
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"sjvenz" wrote...
In Conditional format you can sepecify [specify] if the cell is greater than 0
which would then give you a true value to change the colour of the
cell.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default formula for changing cell color

On the main menu select
Format -- Conditional Formatting...

The window that pops up will make it pretty clear how to set that up.
And you can click the "Add" button to get up to three tota
conditional formats. - Piku

--
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
Changing the color of a cell based on the color of another cell. LATC Excel Discussion (Misc queries) 7 December 4th 09 09:49 PM
time-sensitive color changing cell formula JAMbro1 Excel Discussion (Misc queries) 1 June 19th 09 07:49 PM
Changing color of cell Noelsy New Users to Excel 1 December 1st 07 05:13 AM
changing the color of a cell zhj23 Excel Discussion (Misc queries) 6 December 1st 07 03:09 AM
Changing Cell Color GWOOD Excel Worksheet Functions 2 November 10th 05 05:40 PM


All times are GMT +1. The time now is 10:30 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"