Excel VBA, Remove Fill Pattern

Jump To:


Remove Fill Pattern From Cell:

The following line of code removes the fill pattern from cell B2:

Range(Cells(2, 2), Cells(2, 2)).Interior.Pattern = xlNone

The line below is also equivalant to the previous line:

Range("B2").Interior.Pattern = xlNone

Before:

Excel, VBA, Remove Fill Pattern From Cell Before
After:

Excel, VBA, Remove Fill Pattern From Cell After


Remove Fill Pattern From Range:

The following line of code removes the fill pattern from the range “B2:D2”:

Range(Cells(2, 1), Cells(2, 4)).Interior.Pattern = xlNone

The line below is also equivalant to the previous line:

Range("B2:D2").Interior.Pattern = xlNone

Before:

Excel, VBA, Remove Fill Pattern From Cell Before
After:

Excel, VBA, Remove Fill Pattern From Cell After Range


Remove Fill Pattern From Column:

The following line of code removes the fill pattern from column C:

Columns(3).Interior.Pattern = xlNone

Before:

Excel, VBA, Remove Fill Pattern From Cell Before
After:

Excel, VBA, Remove Fill Pattern From Cell After Column


Remove Fill Pattern From Row:

The following line of code removes the fill pattern from row 2:

Rows(2).Interior.Pattern = xlNone

Before:

Excel, VBA, Remove Fill Pattern From Cell Before
After:

Excel, VBA, Remove Fill Pattern From Cell After Row


Remove All Fill Pattern From Sheet:

The following line of code removes all fill patterns from sheet1:

Sheet1.Cells.Interior.Pattern = xlNone

Before:

Excel, VBA, Remove Fill Pattern From Cell Before
After:

Excel, VBA, Remove Fill Pattern From Cell After Sheet
See also:

If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. Also please visit my website www.software-solutions-online.com

Leave a Reply

Your email address will not be published. Required fields are marked *

Share
Additional Info