View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] mike.wilson8@comcast.net is offline
external usenet poster
 
Posts: 20
Default Need to delete last value in column but not delete entire row

This little snippet works great if I need to delete the last row, but
how can I tweak it where I need to delete the last value in a column
only and not delete the entire row?

Sub test()
Rows(Range("A2:A5").End(xlDown).Row).Delete

End Sub


Example:
Col A Col B
1 Header Header
2 value a value a
3 value b value b
4 value c value c
5 value d value d

Based on this example I would want to remove "value d" from Col A only,
but keep "value d" in Col B and so on and so on if I had other values
in row 5 in other Columns after B.