Thread
:
VBA syntax for Font & Interior ColorIndex
View Single Post
#
2
Don Guillett
Posts: n/a
glad to help. Eat a turkey or drink a wild turkey
--
Don Guillett
SalesAid Software
"Dennis" wrote in message
...
Thanks for your time and knowledge, happy holidays
Dennis
"Don Guillett" wrote:
Range("d15") = Range("c15").Font.ColorIndex
--
Don Guillett
SalesAid Software
"Dennis" wrote in message
...
Using XL 2003 & 97
Would like to place the "value or name" of a cell A1's current
Font.ColorIndex in B1 and A1's current Interior.ColorIndex into C1
By "value", I mean either the Font.ColorIndex (number) or (xlNone), or
better, "Yellow" for 6 or "Red" for 3 or "xlNone".
Similarly, Interior.ColorIndex (number) or (xlNone) or better "Yellow"
for
6
or "Red" for 3 or "xlNone".
Therefore,
A B C
[Font.ColorIndex] [Interior.ColorIndex]
1 (Contents "Yellow" (or "6") "Red" (or "3")
whatever)
2 (Contents "xlNone" "xlNone"
whatever)
I am not sure how to code Range.("A1").Font.ColorIndex.name
or Range.("A1").Interior.ColorIndex.name ?
So that I could code something like:
Range.("B1").value = Range.("A1").Font.ColorIndex.name
Range.("C1").value = Range.("A1").Interior.ColorIndex.name
Range.("B2").value = Range.("A2").Font.ColorIndex.name
Range.("C2").value = Range.("A2").Interior.ColorIndex.name
Hopefully I have been clear?
TIA Dennis
Reply With Quote