• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to delete last row of column; not entire row???

Sleeplol

New Member
Hello Everyone,

How would you delete only the last row of the column while preserving the rest of the row.

The code below deletes the entire row
Worksheets("Sheet2").Cells(Rows.Count, "F").End(xlUp).EntireRow.Delete

The code below deletes the last cell in "F" but shifts all cell to the right over 1 to the left
Worksheets("Sheet2").Cells(Rows.Count, "F").End(xlUp).Delete

I just want to delete the last value in Column F without effecting any other columns

Thanks for any help with this
 
Last edited by a moderator:
Sleeplol
Do You mean ... the last cells of the column?
If so then ... find the last cell and after that empty it.
... or is there something else than value?
 
Yes, you're correct; I need to find the last used cell in a column and empty it.

.Cells(Rows.Count, "F").End(xlUp). finds the last used cell. But I don't know what to use to empty that cell without either deleting the entire row or shifting the row to the left. I want to empty the last cell without changing anything else on the sheet.
 
Ya'll are the best!
vletm thanks for your help
jolivanes, you're right ClearContents was what I needed; thank you
 
Back
Top