phuynh Posted February 28, 2022 Posted February 28, 2022 Excel visual cell background based on RGB value This my use for it, Function bgRGB(r, g, b) Dim clr As Long, src As Range, sht As String, f, v If IsEmpty(r) Or IsEmpty(g) Or IsEmpty(b) Then clr = vbWhite Else clr = RGB(r, g, b) End If Set src = Application.ThisCell sht = src.Parent.Name f = "Changeit(""" & sht & """,""" & _ src.Address(False, False) & """," & clr & ")" src.Parent.Evaluate f bgRGB = "" End Function Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.