![]() |
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 |
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 |
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/ |
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 |
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. |
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 |
All times are GMT +1. The time now is 09:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com