Color Coding Cells With Vba
Feb 7, 2008
I have a spreadsheet with cells containing different names. I want all of the cells containing the word Volitility to be colored one color, all of the cells with the word Momentum colored another color, and so on. I have more than three names so I cannot use conditional formatting. Attached is a workbook that has the uncolored cells in worksheet 1 and an example of what I want it to end up looking like in worksheet 2.
View 9 Replies
ADVERTISEMENT
Mar 29, 2012
I have a worksheet set up where one column of data (we shall call it "A") is the result of several other columns' calculations (uses a formula referencing other cells). I have an entirely separate cell that also gets its data from other cells (we shall call this "B"). What I'm trying to do is make the shading of column "A" dependent upon data from column "B". For example, if column "B's" value is >24, I want column "A" to shade in red.
View 10 Replies
View Related
May 14, 2007
i'm trying to figure out a formula that if a cell is greater or equal to another cell - color a cell "GREEn"
otherwise...color the cell "red"
View 9 Replies
View Related
Jun 13, 2007
I am trying to figure out how to run a macro for 1 particular workbook in an excel spreadsheet. I don't want it run on any of the other workbooks in that file, just the 1. I can't use conditional formatting because I need more than 3 values (if statements).
This is what one example of data in a cell and below is the color I'd like it to turn when I run the macro:
T: 6/1/07
A: 6/8/07
Anything that has a A: (which means an actual date it happened) I'd like the cell to turn blue. If there is an RT: (which means revised target) I'd like the cell to turn red which means it missed it's target date, and has been revised. If it has a TBD I'd like the cell to turn pink (or yellow or any color really). All other cells are just white. I don't know where to find the color codes in excel as well. Other samples of what cells look like are below.
Here is another example:
T: TBD
And final example:
T: 6/4/07
RT: 6/15/07
View 9 Replies
View Related
May 15, 2007
i'm trying to figure out a conditional formatting that if a cell is greater or equal to another cell - color a cell "GREEn"
otherwise...color the cell "red"
View 7 Replies
View Related
Jan 28, 2013
I would like to automatically color the fill of a cell based on the cell contents.
For example, if the cell content is "1" I would like the color of the cell to be cyan and if the cell content is "2" I would like the color the cell to be red.
I've tinkered with several different formulas but I just can't get anything to work.'
View 2 Replies
View Related
Aug 1, 2007
Im working on a large workbook with multiple worksheets. Each of these
worksheets has a large amount of data relating to training records. In
particular, the date that an employees certification is due to expire
(eg: 01/02/2007 or 31/09/2009 etc)...(im also in Australia so my date formats may be different).
I need to color code these records with the below logic, eg:
If Cell Date is <Today() = Red Text or Cell
If Cell Date is <18months from Today()+1 = Yellow Text or Cell
If Cell Date is >18months from Today() = No change - leave white
I have basic VBA knowledge, but will be able to work my way through
some of the code that is posted.
It's also key to note that there are multiple 'Blank' and 'Text' Cells
in these worksheets. I only want to apply this code to a cell if it is
populated with a date, is this possible ?? (eg: i only want to change
the color of the dates listed, not the other cells with text and single
numbers).
I have played around with the Conditional Formatting but i will need
more than 3 conditions in the future. I've also attached a small
screenshot of the data for your convenience.
View 14 Replies
View Related
Jun 27, 2006
Is it possible to select a number of cells that are say yellow when blank but once someone type "N" or "No", they change to blue and if "Y" or "Yes" they change to green. I tried conditional formatting but it does not change the blank range to yellow until I have entered something into it.
View 6 Replies
View Related
Jan 4, 2010
how to code to specify a cell in which to enter data into a spreadhseet, when the heading contains only one row.
In the attached example the headings contain multiple rows with merged cells, is there any way of overcoming this so that the entries are placed in the correct cells?
View 11 Replies
View Related
Oct 27, 2009
I have attached the relevant spreadsheet for which I need to alter the color of the columns based on Site number ( Sheet 1). % Mortality will be represented in the Y-Axis, and the Site numbers would be on the X-Axis. All columns (% Mortality) except one will be of the same color, and the one of a different color will indicate a specific site. As an example, site 86 is colored differently. The way I require the chart to look is shown on Sheet 1.
After reading through some great posts on Ozgrid, I managed to do this using conditional formatting (Sheet 2), but that sort of falls short because I am required to add a data table to the chart, and the parameter that is indicated by the column bars happens to appear twice in the data table.
I was wondering if this can be automated maybe using VBA, but with the possibility of simply matching the color of columns with the font color of respective entry in the data series.
View 9 Replies
View Related
Nov 18, 2007
I am looking for a very simple script that will achieve the following:
On the clicking of a button, Select and shade in a cell yellow, delete the yellow shading of the previous cell. The shading & selection should move up a column of cells, 1 at a time, in the following order:
From B10 to B9, then B9 to B8, B8 to B7 etc until the selection and shading is at B2. Once it is at B2 subsequent clicks will simply keep it at B2 (the top). Thus after 8 clicks the shading & selection should travel from B10 to B2, with only 1 cell being shaded yellow and selected at any one time.
View 5 Replies
View Related
Jun 18, 2008
I have a spreadsheet that i download from the net daily, which is seperated into columns of information.
I want to be able to look down a column and mark a cell in a seperate column if the cell font text is red.
For example looking down column A ... if the font text of a1 is red then mark the cell background colour of T1 red - if a2 text colour is red then mark the cell T2 red .... etc etc.
If the font colour in a1 or a2 ... etc etc is any other colour then do nothing.
I have 5 columns I wish to look down and mark in 5 seperate columns - I have tried to do this by conditional formating but don't know the fomula for checking font colour.
View 9 Replies
View Related
Feb 7, 2013
I am using Excel 2010 and basically i am trying to fill a range of cell with a green color if any value was enter in a specific cells. Example: I would like to fill range: A10:c13 with a green color (regardless of the cells content in this range) if a value was entered in cell C10 or C11 or C12 or C13.
I've tried conditional formatting but unfortunately I'll have to apply formatting for every cell and for a range of over hundred cells is not efficient.
View 7 Replies
View Related
Apr 2, 2008
I’m trying to make my life a bit easier, by adding a few macros and formulas to the spreadsheet (Everything was done completely manually before I got here!!!).
What I would like to do is take two columns, which contain a start and end time for work shifts, and colour them GREEN once I have entered a name in the Worker column (Along side the two with the time), and also to fill a cell with a Yes or a No. I’m aware of auto conditioning, and I’ve tried to have a play to get this to work, but I just can’t work it out.
I have posted a link to an image which shows what I want. I hope I've explained it well enough!
http://img530.imageshack.us/img530/6239/excelspfk0.jpg
View 9 Replies
View Related
Jan 31, 2013
I have a similar question regarding coloring of empty cells between two cells with specific numbers as posted in below thread : [URL] .....
This is exactly what I want. But here I have some problem with formula.
=COUNTIF(A1:Z1,1)=1
Above formula could pick cell value 1 and color the empty cells in a row between the cells having value=1. But if I want to use the same formatting for other numbers like 2 or 3 it doesn't work.
For example in row(A1:Z1) I have A1=1, D1=1, and F1=2, K1=2, and O1=3, U1=3
I required multiple conditional formatting that could color the cells based on values first from A to D then from F to K and finally from O to U.
I'm using above formatting it works with cells having values 1 but its not working for 2, 3 or any other cells values.
I have already tried replacing 1 in above formula with 2 and 3 but it doesn't work.
View 1 Replies
View Related
Jan 27, 2005
how can I automatically fill cells with certain colors based on the value of the cell. (i.e. I want to search an entire workbook and fill cells with values between 80 and 99 green, 60 to 79 yellow and 0 to 59 red.)
View 9 Replies
View Related
Jan 15, 2008
I’m trying to change color in cell B9 according to different conditions in Cell C9 (than on b10 according to c10 and so long until necessary - probably will be around 2000 lines). Since there are more than 3 conditions and in two cases condition depends on the color of the C Column, I can not use conditional formatting. I’ve searched and found similar forums here, but since I’m ignorant in VBA code, I couldn’t manage to make adjustments. So if you can help me with the code, I would really appreciate it!
Condition and Results required would be:
IF column C = “S” than on Column B = color cell light blue with white border
IF column C = “P” than on Column B = color cell Green with white border
IF column C = “A” than on Column B = color cell Yellow with white border
IF column C = “L” than on Column B = color cell Red with white border
IF column C = “C” than on Column B = color cell Dark Blue with white border
IF column C = “ ” than on Column B = color cell white
IF column C = “V” and has white background than on Column B = color cell white
IF column C = “V” and has a Dark Grey background than on Column B = color cell Dark Grey
I don’t know if the last two are feasible.
View 6 Replies
View Related
Apr 20, 2008
creating this code or fomatting in my excel file. I want to fill color in cells between the two cells that has value of say "1" or anything in it. There will be only 2 numbers at any time in any row that has the value in it. All other cells will have value of "0" or can be changed to empty cells. So, the formula should check from say range "A3 to Z3" in row and for example it gets the first numbered cell in C3 then it start filling color from C3 cell until it reaches the other cell in that range that has the number in it. Say the row "A3 to Z3" has 1 number in C3 and other in cell H3 then it should fill color between this two cells from C3,D3,E3,F3,G3 and H3.
View 7 Replies
View Related
Jun 3, 2008
I have a 2 lists of manually entered values where the values in each row are related. They are related in the sense that if the difference between them is equal to or less than, a given amount then the cell containing one value is colored Blue. e.g.
COl A holds Value x while COl B holds value y. I need to check which value is entered in columns A and B and if a given difference or greater exists colour the cell in COl B. For example the relationship relevant to a COL A value of 21.0 is 11.0.
So, I enter the following;
A1 B1
21.0 13.0 <----------------No color Blue
I enter new values
21.0 9.5 <----------------B1 is blue.........................
View 2 Replies
View Related
Mar 18, 2008
I am trying to code a macro to run down through a column and hide the row if it finds a cetain marker (i.e. the letter "n") in the column, and then move onto the next one.
View 9 Replies
View Related
Dec 10, 2006
I have an if statement and if it's true I would like to have the cell turn black as well as mark it with an "x"
View 7 Replies
View Related
Nov 25, 2008
a formula that you can you add cells with a certain color text only?
View 14 Replies
View Related
Jun 2, 2009
I have a table with changing lengths of the rows and columns. At the end of each row/column there is a cell with the sum. I want to put some color to it and make some additional formatting - have some borders around the main table and different colors for the empty and non-empty cells. I have the following
View 14 Replies
View Related
Oct 26, 2011
Is there a way to sum rows by color other than creating a new function?
View 5 Replies
View Related
Jun 2, 2008
I am trying to write a macro to color cells red from a:g if g > 1. I need to do this via macro and not with conditional formatting. I've tried this macro below but it doesn't work.
Set rng2 = Range(Cells(3, 7), Cells(lastrow, 7))
For Each cc In rng2
If cc.Value > 1 Then
Range(Cells(cc, 1), Cells(cc, 7)).Interior.ColorIndex = 3
End If
Next cc
View 9 Replies
View Related
May 22, 2007
My spreadsheet calculates the date on a daily basis.
I would like to create a code in my spreadsheet which uses the year and month in question.
First, 2006 is is designated as a "3"
2007 "4"
2008 "5"
2009 "6" etc
Don't worry about anything prior to 2006.
Next, the months are represented by single digits. So, January = 1, February = 2, March = 3, April =4, etc. September is 9, and October = 10 but all the numbers over 9 have to be reduced to a single digit, so October = 1+0=1, November =1+1= 2, December =1+2= 3.
Now, the formula for the Month is:
Year + current Month
So, May 2007 = 4 + 5 = 9
June 2007 = 4 + 6 = 10 = 1
July 2007 = 4 + 7 = 11 = 2,
January 2008 = 5 + 1 = 6, etc
View 9 Replies
View Related
Apr 3, 2008
Is there a way of coding a macro in VBA that allows you, with one macro, to enter text in one cell and at the same time enter a value to the cell on it's right?
I don't want to name the cells, but I wondered if you could add to the code a piece of code that basically said "Select the cell to this cell's right and add the value x".
View 9 Replies
View Related
Jun 3, 2008
I have made this vba to go out and look at 2 different locations which contain simular folder names.
The script then writes the folder names in Column A, followed by the Size of both the folders from the 2 locations. The script is comparing the second location folder name to what the first process put in Column A so the folder names will be aligned with the file sizes. It is also converting the file sizes from bytes to the most appropriate one.
The problem I am having here, is once I put the second part in for the second folder, the script is either taking forver (More than an hour) or is freezing. So I am not sure if I put it in a loop somewhere or what exactly is happening. I am just wondering if I can get some help troubleshooting and optimizing this code....
View 9 Replies
View Related
May 1, 2007
How it is possible to lock the VBA coding and Modules? I mean when Some one want to view VBA coding the Password window should not appear, istead of that a message box appears with message something like "Not viewable"
View 9 Replies
View Related
Jul 7, 2014
How can I format for a + or - for positive negative numbers and also have positive numbers be green and negative numbers be red?
View 2 Replies
View Related