colorindex

  1. P

    VBA Entering If statement

    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...
  2. J

    VBA to change background color of cell. color based on day of the month

    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...
  3. M

    Speed up selected cell fill colour macro

    Hi all, 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...
  4. A

    search and find location of colorindex = 16

    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? thanks
  5. S

    VBA button to filter out transparent cells

    Hi everyone, 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...
  6. B

    ColorIndex formula that works with Ranges

    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 =SUMPRODUCT((COLORINDEX(A1:A5)=14)*(B1:B5)) Where <tbody> (Green) 15 (Green) 27 (Yellow) 62 (Green) 38...
  7. C

    Colorindex 2 vs -4142

    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. Visually...
  8. W

    Sumif function doesn't work with ColorIndex criteria

    Hi, 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...
  9. J

    Subscript out of range on RGB?

    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...
  10. Y

    VBA: Using Selection.Interior.ColorIndex on multiple columns but only once a line

    Hi everyone, 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...
  11. R

    searching by fill color

    Hi 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...
  12. G

    Highlight Row if Cell Value Found in List in Other Workbook

    Hi all, 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'...
  13. P

    multiple font.colorindex VBA code causing "Unresolved Content" error

    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. Sub Bold_Stone() Dim rng As...
  14. T

    Fidgety VB Code

    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...
  15. M

    VBA issues with .ColorIndex on graphs

    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...
  16. A

    Excel Color Functions

    Hi everyone, 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...
  17. A

    .Interior.ColorIndex

    Hello, 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 Next cell End Function The function works fine when it is used with the 'call'...
  18. G

    Range Interior issues

    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 setRowColor =...
  19. J

    VBA Cell color help

    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...
  20. W

    vba colorindex if or statement not working

    I'm making a basic, quick macro to add values to a cell if it's green or blue. users inputed various shades of green and blue. I pulled all the values: 'blue 33,34,37,41,8 'green 42,35,4 When I try to do an if-then statement with multiple conditions, it returns true for any color. In the example...

Some videos you may like

This Week's Hot Topics

Top