Hi,
I am new to VBA. I want a code which needs to delete the count of rows which has exceeded the value of c. Suppose c stores a number, which is the number of rows to be kept and the rest of the rows deleted. I also want my header row to be the way it is. It should not be deleted.
Basically i want this
(Total number of rows - (c number of rows + the header row)).delete
I am using the following but not getting the desired result. Please help me out. Its urgent. I am stuck.
Rows .Resize(ActiveSheet.Range("a2", ActiveSheet.Range("a2").End(xlDown)).Count - c).Delete
Please assist.
Thank you,
Ron
I am new to VBA. I want a code which needs to delete the count of rows which has exceeded the value of c. Suppose c stores a number, which is the number of rows to be kept and the rest of the rows deleted. I also want my header row to be the way it is. It should not be deleted.
Basically i want this
(Total number of rows - (c number of rows + the header row)).delete
I am using the following but not getting the desired result. Please help me out. Its urgent. I am stuck.
Rows .Resize(ActiveSheet.Range("a2", ActiveSheet.Range("a2").End(xlDown)).Count - c).Delete
Please assist.
Thank you,
Ron