Try code like the following:
Sub AAA()
Dim LastCell As Range
Dim WS As Worksheet
Dim N As Long
Dim Cols As Variant
Cols = Array("A", "C", "F", "K")
Set WS = ActiveSheet
With WS
For N = LBound(Cols) To UBound(Cols)
Set LastCell = .Cells(.Rows.Count, Cols(N)).End(xlUp)
LastCell.Delete shift:=xlUp
Next N
End With
End Sub
This deletes the last value in each of the columns. It supports the
case when the columns have different lengths.
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Mon, 16 Mar 2009 14:21:00 -0700 (PDT), Steve
<(E-Mail Removed)> wrote:
>Hi all. How can I have VBA clear the contents of the cells in the
>LAST ROW in columns A,C,F, and K? The last row will vary, so VBA
>needs to determine which row is the last. The columns will remain
>static.
>
>Thanks!