Hi, I have different ranges of cells where once a cell goes over a limit then that cell changes yellow. Once one cell changes yellow in the range I don't want the cells after to change yellow. The ColorIndex of every other cell is 24 if that's helpful. For example, in a range of F4:F7 if the...
This one is beating me..... I have a macro on the sheet where anytime a change is made, it enters this sub. That sub works perfectly. The sub below is my problem. The sub below is highlighting cells with ColorIndex = xlNone with ColorIndex = 42
I cannot figure out why it is entering that If...
I have current code to change the background of the cell I updated "Today" to the color of the day. Today is the 15th of the month, so todays color is 15. What I am looking for is the "15" to change based on the day, so tomorrow the code would change to 16 without me going into the code daily...
I am unsuccessfully trying to speed up my un-highlight selected cells macro. I have been toying with the code to speed it up as if I mistakenly select an entire row it takes a long time to complete. But I am too useless and have failed to get it working correctly. I have also been...
I have several locations in my spreadsheet that have merged cell location that has the colorindex of 16. I want to save the address of the different locations in my sheet that have colorindex of 16 to several variables or an array.. How can i do this?
I've spent two days using my Google-fu trying to find an answer, but I'm stumped.
I have a spreadsheet that I'm using to monitor the progress of a number of projects, sort of Gantt chart-style. The projects are listed down the rows and the months of the year are the columns...
Hi I'm using the colorindex() formula in a work book, but i would like it to work with a sumproduct() formula aswell, for instance;
Where the color index of green is 14 and yellow is 6
I'm using Excel 2016 and I'm using VBA to get the colorindex of cells using
LeftColorIndex = wshScores.Range("D" & lRow).Offset(0, -1).Interior.ColorIndex
in a "for loop".
The sheet is set to not show grids.
Some blank cells return colorindex=2 and other show colorindex = -4142.
I just found an issue concerning the Sumif function. When I enter the ColorIndex as criteria, it gives 0 as result. I tried to enter the formula in many ways, I even setup a ColorIndex function to check if the color index of the cell in criteria is actually the same as for the cells in...
I'm trying to set the interior color of a row, and for some reason I'm getting a "subscript out of range" error when I use the Interior.ColorIndex property. The goal is to mark Saturdays and Sundays in a chart. Code follows; any tips?
If WorksheetFunction.Weekday(datWork, 1) = 1 Or...
I would like to be able to:
- use Selection.Interior.ColorIndex on several columns but only once every line.
- if 1 cell (B5) on the line (5) has already been "colored" (selected) and I select an other cell (D5) one the same line then the the first cell (B5) go back to no color...
I want to write VB code for an excel SS that searches for fill color and then performs an action based on that.
For instance, if the fill color is red, delete the cell or empty it
I use this code for coloring my cells:
With Sheet1.Range(Cells(xx, yy), Cells(xx + 1, yy)).Interior...
I am creating a macro to open a .dat file, delete unwanted rows and highlight all rows where the specified cell value is found in a list which is located in a worksheet in the workbook containing the macro.
I cannot get the VLOOKUP to work. It gives the error, "Run-time error '1004'...
I'm using the following VBA code in excel 2007 to change the font color & bold when a word occurs within a range (rng).
The range is column "L" over 618 rows. On its own it works great! it finds the word in each occurrence within range & changes the properties.
Dim rng As...
I'm trying to put together a method for letting people tally up short, medium and long calls and to document the date along with those tallies. So far, I've got some code that will change the background color and leave the current date if the cell is double-clicked.
The first double-click...
I have this chart maker that makes bar charts structured with multiple series (upwards of 100) and then colors in the bars based on other criterion.
I'm not going to post the entirety of my code because it's just a snippet that seems not to work.
By not work, it's not that there are bugs, it's...
I need one of my cells to take a certain value based on another cell's background color that is assigned via conditional formatting. Finding a function that returns the colorindex of a cell was relatively easy - the problem is that this function returns -4142 when it comes accross...
I am using Excel2000 on a windowsXP machine. I have the following function.
Public Function testing(dataRange As Range)
Dim cell As Range
For Each cell In dataRange
cell.Interior.ColorIndex = 8
The function works fine when it is used with the 'call'...
This is the code I'm using. Nothing complicated...
Public Function setRangeColor(fromCellAddress As String, toCells As Range)
Dim fromCell As Range
Set fromCell = Range(fromCellAddress)
toCells.Interior.ColorIndex = fromCell.Interior.ColorIndex
Ok, this seems like it should be the easiest thing in the world, but there is obviously something critical that I'm missing. I've done a search of the forum but can't seem to find a similar issue.
I'm writing a longer routine, but am running into an issue with filling the cell color. It...