Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
prat1507
Specialist
Specialist

Clear cells with white font

Hi

I've been trying to clear the cells with white font, I've been using the below code:

    XLSheet.Range("A1:M55").Select

        For Each Cell In Selection

        If Cell.Font.Color = rgb(255,255,255) Then

        XLSheet.Cell.Clear

        End If

        Next

But this is not working. Please help.

Regards

Pratyush

3 Replies
tresesco
MVP
MVP

This should have been asked in an Excel forum.

Try like:

Range("A1:M55").Select

        For Each Cell In Selection

        If Cell.Font.Color = RGB(255, 255, 255) Then

        Cell.ClearContents

        End If

        Next

End Sub

jonathandienst
Partner - Champion III
Partner - Champion III

This is not really a Qlik issue. I suggest that you post this in an Excel/VBA/VBscript forum.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
prat1507
Specialist
Specialist
Author

Hi All

I'm using this in qlikview to edit the excel which I've been creating, writing a macro in qlikview is very different from wrtiting it in the excel itself, hence I'd posted this in qlikview community.

Regards

Pratyush