FORMATGET
There are 10 functions.
These functions will not update automatically when the colour changes. You can press (Ctrl + Alt + F9) to refresh this function.
For instructions on how to add a function to a workbook refer to the page under Inserting Functions
FORMATGET_COLOR
Public Function CELLCOLORGET_RGB(ByVal rgeCell As Range) As Long
Dim lcolorrgb As Long
lcolorrgb = rgeCell.Interior.Color
CELLCOLORGET_RGB = lcolorrgb
End Function
FORMATGET_COLORINDEX
Returns the colour index for a particular cell.
'rge - The cell you want to check
Public Function CELLCOLORGET_INDEX(ByVal rgeCell As Range) As Integer
Dim icolorindex As Integer
icolorindex = rgeCell.Interior.ColorIndex
CELLCOLORGET_INDEX = icolorindex
End Function
FORMATGET_COLORTHEMEINDEX
Public Function CELLCOLORGET_THEMEINDEX(ByVal rgeCell As Range) As Integer
Dim ithemecolor As Integer
ithemecolor = rgeCell.Interior.ThemeColor
CELLCOLORGET_THEMEINDEX = ithemecolor
End Function
FORMATGET_COLORCONDITIONAL
Public Function CELLCOLORGET_CONDITIONAL(ByVal rgeCell As Range) As Integer
Dim icolorindex As Integer
Dim oFormatCondition As FormatCondition
If (rgeCell.FormatConditions.count > 0) Then
Set oFormatCondition = rgeCell.FormatConditions(1)
icolorindex = oFormatCondition.Interior.ColorIndex
End If
CELLCOLORGET_CONDITIONAL = icolorindex
End Function
FORMATGET_FONTCOLOR
FORMATGET_FONTCOLORINDEX
FORMATGET_FONTCOLORTHEMEINDEX
FORMATGET_FONTCOLORCONDITIONAL
FORMATGET_FONTNAME
FORMATGET_FONTSIZE
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext