I have 2 different worksheets...each of them containing item numbers. On Sheet1, Column A contains the item numbers. I have conditional formatting to change the interior color of column A based on several criteria.
On Sheet2, I also have item numbers, but they are located in Column B. If item 12345 in Column A on Sheet1 has an interior color of yellow, I would like that same item on Sheet2 to have an interior color of yellow.
I would like to have cells that conditionally format the font color in the cell based on the background color of the cell. Essentially I have a matrix with some cells highlighted in red, yellow, or orange. There are values in each cell of the matrix. If a value is 0 I want the font to be grey. If the value is NOT 0 AND the cell backgorund color is NOT white, I would like it black and bold. Is there any way to do this in excel or using VB?
In Sheet1 cells A1-BW46 (3450 cells), using 9 different colors to fill all the cells.
In Sheet3, starting in A2, I have a plain text list of 3450 cell ranges "A1", "A2", "A3" etc covering all 3450 cells in Sheet1.
I want to populate next to this list the interior color value of the corresponding cell. So in cell A2, I will have the text "A1", in cell B2 I would have either a numerical or text value giving me the color that A1 in sheet1 is filled with.
The script doesn't have to auto update, I will run manually when neededI don't need any manipulation, only the value of the color, and that can be hex, rgb.
I can't upload the actual sheet I'm working with, but if my description of the problem is lacking, I may be able to create a sample sheet to give the idea.
I have a userform which stores the backcolour value of some labels in a spreadsheet so that it can be recalled dependent on what month a user selects. The trouble is that in a spreadsheet, I want to use these backcolor values to colour the interior of a cell. However, the values don't seem to be liked by VBA and I get a 'subscript out of range' when I try to match:
This error comes up against values 65535 and -2147483633
What am I doing wrong? what would be the best way to store a backcolor value in one cell so that it can be used for a cell interior colour?
I have an error message that says: Run time error '1004': Unable to set the colorIndex property of the interior class. I attached code for your reference.
If (Range("B10").Value = "Gift" Or Range("B10").Value = "Entertainment") And Range("C10").Value = "" Then Range("C10").Interior.ColorIndex = 6 MsgBox "Please Fill in the Person's Name & Company." Range("C10").Select Range("C10").Interior.ColorIndex = 6 End If
I'm trying to create a simplified Gantt chart of sorts, and cannot figure out one piece of it. I'm not sure how to write out exactly what I need, but here goes.
I would like to have a formula that looks at the percent completed (which the user inputs) and multiplies it by the total duration for the task to give a total number of days completed. Then, under the corresponding dates, the color of the cell would change. I've attached a simplified version of what I'm talking about.
On the attached spreadsheet, the total duration (D2) is 5 days and the percent completed (C2) is 40%. This calculates to 2 days. With that said, I would like the cells under the first 2 days under the listed dates (E2 and F2) to change color. When the percentage complete reaches 60%, then G2 would change color, when it reaches 80%, then H2 would change, and when it reaches 100%, then I2 would change.
My guess is that the formula will need to result in a particular value, and then I'll use Conditional Formatting to do the actual changing of the cell color. Assuming this is correct, I still don't know what formula to use to accomplish this.
Do While Cells(iCount, 5).Interior.ColorIndex <> xlColorIndexNone Cells(iCount, 5).Value = Cells(iCount, 5).Interior.ColorIndex iCount = 1 + iCount 'increment by 1 each loop Loop
I get what the loop is doing but I am not sure what the Interior is referring to. When I looked it up I saw it can be a property or an object but I am not sure exactly what it means, why you need it and in what other cases you may use it? I am so confused about this I don't even know what to ask?
If I had to guess I think it means the the property of the individual cells but in that case I don't see where the object comes in?
i'd like to use a macro to loop through a range of cells and change the interior color index based on the cell values (ex. if cell value < 10, set interior to blue, if cell value > 400, set to green) i'm trying a for each loop with an if statement but i keep getting syntax errors, i know this is probably a simple problem but i'm not experienced in vb,
I am using Office 2007 and have successfully used the Cells.Interior.Color to change cells fill color. I would like to be able to undo these changes. Depending on the data entered I am changing the color but I may need to change it back to white. When I use the Cells.Interior.Color = vbWhite the cell fill changes to white but the cell border is gone. Is there a way undo the color change and have the cell border show up?
I have some code that recently I found I had a new criteria that I originally did not have when I worked my original database. THis code works perfectly as is BUT if in column "D" if this is blank I would like to do nothing/ make no changes in that row.
Sub ChangeColorsotherdesigXXX() Dim c As Range
For Each c In Range("D2", Range("D65536").End(xlUp))
With Range("a" & c.Row & ":s" & c.Row) If Not CStr(c.Value) Like "612#" And Not CStr(c.Value) Like "712#" Then .Interior.ColorIndex = 36 .Font.ColorIndex = 1 End If
I need to have 3 arrays for a column of data, the first holding each cell value, the second the Row number and the third, the Interior.Color.
Currently I am having to assign each row and interior colour to a variable with a | between each then use the split function on that variable to assign it to an array (no problem with each cell value as that can be assigned directly to an array.
Code: For Each rC In Range("a2", Range("a" & Rows.Count).End(xlUp)).SpecialCells(12) If sO = Empty Then sO = rC.Interior.Color Else: sO = sO & "|" & rC.Interior.Color End If If sR = Empty Then sR = rC.Row Else: sR = sR & "|" & rC.Row End If Next c = Split(sR, "|") v = Split(sO, "|") x = Range("a2", Range("a" & Rows.Count).End(xlUp)).SpecialCells(12).Value
As there are over 10,000 rows involved loading the variables is taking a considerable amount ot time, whereas the direct loading of the value is very fast. So I want to be able to load all arrays directly.
I have tried various methods to get Row and Interior.Color to load directly into arrays c and v but without success so far.
I have been struggling with this formula for ages and have finally given up. What I would like to do is to do a lookup on the concatenated values of Province, Department and Initiative No, which has mutiple values in the status of milestone column, and then give the answer based on a condition.
The condition for this example should be, that if the returned status / or statuses of the initiative is all 1, then the value should be 1, if it's all 2, then the value should be 2, and so on.....but if the values returned from the status of the initiative is a combination of 1,2 or 3, then it should give me the answer 2. If 4 is part of the comination of values returned, then the value should be 4.
Zero - 0 should be excluded from the formula as it is part of planned values and not actual.
I have a bar chart that was made from table 1 which has the value in it. I have another table, table 2 that has the name corresponding to the value in table 1. I want to color data points in a bar chart with a different color for each name I have in table 2. I also want to give a data label in the data points with the value I have in table 2 instead of the original data label from table 1. Is it possible to do it?
I'm trying to discover the best way to accomplish formatting a cell by filling it a certain color based on 2 of 3 criteria of other cells.
Column A has the title of the field. Cells B1:D1 have one of 3 values: Nothing/blank, Complete, or x. If all of the x's are gone within the range of B1:D1, I'd like to automatically format cell A1 to fill in Blue (or any color).
if it actually possible to colour data points depending on the colour of the cell of the data it refers to? if not is it possible to colour it any other way i have uneven amounts of data for weach month but still want the months to be displayed, this is the best way i can think of of doing this
I have a quarterly report that measures the safety performance of the plants in our company using bar charts. One set of 4 charts for the company as a whole and four additional sets of four for each of our divisions for a total of 20 charts.
I would like to change the color of the bars based on whether the location has met (bars colored green) or failed to meet (bars colored red) the goal for that criteria. The company average will be a yellow bar. Of course it can be done manually but that is really slow and tedious.
Is there a way, using VBA or a macro, to change the color of a bar (data point) based on the value of that data point? Can it run through all of the data points in each chart and make those changes based on criteria that I can set for each type of chart?