Hi Again Gembree--
and again thanks for the detailed help. I feel like im almost there..
Followed your directions to try and return the actual colors of my conditional formatting, but came back with some errors.. and i was hoping you might be able to lend some advice again..
I'll try and outline the issues as clearly as possible for you:
(1.) As a complete novice, i feel that my mistake must be how i entered the Sub you provided
Code:
Sub GetTheColors()
For i = 1 to 100
For j = 1 to 10
Cells(i,j+10) = Cells(i,j).FormatConditions.Interior.ColorIndex
Next j
Next i
End Sub
You indicated that this will return the real colors for cells A-J100. And in an attempt to tailor the code for my particular workbook i came up with this (i included a screencap of what I working off of) :
Code:
Sub GetTheColors()
For ad = 1 To 1200
For ab = 1 To 10
Cells(ad, ab + 10) = Cells(ad, ab).FormatConditions.Interior.ColorIndex
Next ab
Next ad
End Sub
I used "AB" because even though the cells aren't formatted, I would prefer that actual colors be written after column AB (the image below only shows where the conditional formatting was applied)
Capture.jpg
When I try to run the Sub above from the macros within excel, it comes back with this error:
Capture2.jpg
With this line highlighted after debugging: " Cells(ad, ab + 10) = Cells(ad, ab).FormatConditions.Interior.ColorIndex"
*Issue #1 might be solved after you take a look at my 2nd question, but i can't be sure.
(2.) Is the Fucntion code you provided (below) intended to be copy pasted within the same module as SubGetTheColors?:
Code:
Function getColorIndex(TheColoredCell)
getColorIndex = TheColoredCell.Interior.ColorIndex
End Function
If i assumed correctly in (2.), then should the resulting module contain both of the aforementioned codes? Also, just wondering if the code above to 'pass the range in question as an argument to the function,' should "(TheColoredCell)" actually be "(GetTheColors)"?
I'm just assuming that the Function should be calling the Sub...
AGAiN thanks so much for any help you can give.
Bookmarks