Deleting content after the last data value in VB or Macro.
Actually I used it as one line and did not get any syntax error but it did
not work form me. Thank you for your comment though.
"carlo" wrote:
On Nov 22, 1:59 pm, me wrote:
Thank you for you quick reply but somehow it did not worked. I will try to
apply diferently if it can change the result. Thanks
"carlo" wrote:
Hi me
this should work:
sub content_del()
Range("A" & Cells(65536, 1).End(xlUp).Row + 1 &
":A65536").EntireRow.Delete
End Sub
hth
Carlo
On Nov 22, 1:09 pm, me wrote:
I would like to something using macro but really I don't know how. This is
something I like to do
In a data containing worksheet,
1- finding the last cell which has value or text in A1 column in worksheet-A
2- Then delete the rest of the rows thereafter this row number
Something like below. Any help will be appreciated greatly. Thanks
Sub content_del()
$A = Find the last entered value at A1 column
then delete rest of the rows below this number.
Range("???:A1400").Select
Selection.EntireRow.Delete
End Sub- Hide quoted text -
- Show quoted text -
did you see, that my post cut the line in half?
this one should actually be on one line:
'----------------------------------------------------------------------------------
Range("A" & Cells(65536, 1).End(xlUp).Row + 1 &
":A65536").EntireRow.Delete
'----------------------------------------------------------------------------------
hth Carlo
|