Hi all,
New to the forum and to excel macros.
I am trying to remove the numbers from conditional formatted cells and just keep the cell color.
I am not sure it can be done, but I have tried this macro which should change the text color of the cell to the same cell color of the cell in order to "hide" the text.
It doesn't work 100%, can someone please have a look at this and advise?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim LastRow, LastCol, BackgroundColor, mycell
LastRow = Application.Cells.SpecialCells(xlCellTypeLastCell).Row
LastCol = Application.Cells.SpecialCells(xlCellTypeLastCell).Column
mycell Range
For i = 1 To LastRow
For j = 1 To LastCol
If IsNumeric(Cells(i, j)) Then
BackgroundColor = Cells(i, j).Interior.ColorIndex
Cells(i, j).Font.ColorIndex = BackgroundColor
End If
Next j
Next i
End Sub
Bookmarks