Hello....I need some solution on clearing the data with contents along with format...
assume I have headers in Row 4 and want to clear the data from 5th row on wards every time when I run the macro....can anyone help me...below code I created but not working ..its clearing the header when I don't have data.....thank you
Lastrow = Sheets("Sheet1").Cells(Rows.Count, "Y").End(xlUp).Row
Sheets("Sheet1").Range("B5", "Y" & Lastrow).ClearContents
assume I have headers in Row 4 and want to clear the data from 5th row on wards every time when I run the macro....can anyone help me...below code I created but not working ..its clearing the header when I don't have data.....thank you
Lastrow = Sheets("Sheet1").Cells(Rows.Count, "Y").End(xlUp).Row
Sheets("Sheet1").Range("B5", "Y" & Lastrow).ClearContents