hi mi friends i need some help i have file whit 2 column
COLUMN B data whit color parallel column A cell need change font to white color
Untitled.jpg
hi mi friends i need some help i have file whit 2 column
COLUMN B data whit color parallel column A cell need change font to white color
Untitled.jpg
Maybe:
Sub arn0ldas() Dim i As Long For i = 3 To Range("B" & Rows.Count).End(3).row If Cells(i, "B").Interior.ColorIndex = 3 Then Cells(i, "A").Font.ColorIndex = 2 Next i End Sub
Sub Maybe() Dim i As Long For i = 1 To Range("B" & Rows.Count).End(xlUp).Row If Range("B" & i).Interior.ColorIndex = 3 Then Range("A" & i).Font.ColorIndex = 2 End If Next i End Sub
If you are happy with my response please click the * in the lower left of my post.
Or you might prefer conditional formatting
in conditional formatting for column A
and set the font to white=getfillcolor(B1)=3
and the vba to make it work
Function GetFillColor(Rng As Range) As Long GetFillColor = Rng.Interior.ColorIndex End Function
Last edited by scottiex; 02-09-2016 at 08:55 PM. Reason: woops A not B
you evrybody best guys
but whit conditional formating dont works for me can you insert file whit example
OK here you go
just a min
I sent the xlsx file. *facepalm*
here is the xlsm that will actually work.
Book12.xlsm
Last edited by scottiex; 02-10-2016 at 08:02 PM.
Come to think of it - maybe what you are noticing (in terms of it not working is related to this one being non volitile
you might want to make it volatile so it updates the formula. (amended in the file above)
Function GetFillColor(Rng As Range) As Long Application.Volatile GetFillColor = Rng.Interior.ColorIndex End Function
Last edited by scottiex; 02-10-2016 at 08:04 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks