Macro to look at multiple columns

TomDrury89

New Member
Joined
Aug 22, 2018
Messages
14
Hi,

I currently have the below macro which looks at column K and clears the blank cells. I am wondering if there is a way to then have a look at doing the same for column L and D. My macro skill is very limited.

The below macro was provided to me, i am just hoping to extend this to other columns.

Sub FilterBlank()

With ActiveSheet
With Range("K4:K" & .Cells(Rows.Count, 1).End(xlUp).Row)
.Offset(-1, 0).AutoFilter Field:=1, Criteria1:=""
.ClearContents
End With
.AutoFilterMode = False
End With
End Sub
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Is there a reason you are clearing the contents of blank cells?

This is a good oportunity to practice using the macro recorder.
 
Upvote 0

Forum statistics

Threads
1,214,854
Messages
6,121,941
Members
449,056
Latest member
denissimo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top