Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2000 ... No response to an earlier post, but turns
out I didn't have issue correct either. I have a Template consisting of 15003 rows ... The last row which might contain data is 15000 ... with row 15001 being empty ... & 15002 & 15003 containing various totals. I copy/paste in a random amount of data (2000-11000 records & then run a recorded Macro to format data. Issue is ... I would like VB Code to place near end of Macro that would delete all unused rows between end of data & row 15000 (while keeping rows 15001, 15002 & 15003). The following VB Code worked fine until I added the Totals to rows 15002 & 15003 ... These rows now get deleted (so goes the Totals) ... I wish to keep them. cLastRow = Cells(Rows.Count, "B").End(xlUp).Row Set myRng = Range("B" & cLastRow + 1 & ":B15000") myRng.EntireRow.Delete Note: Col A is Blank ... Col B contains data Above said ... can one of you many Wizards of this board tell me what adjustments to above code I must make ... or ... offer me new code all together to handle this??? My many thanks to those of you that support these boards ... Kha |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can i delete unused row and columns ??? | Excel Discussion (Misc queries) | |||
VBA code to delete rows | Excel Discussion (Misc queries) | |||
how to delete unused footer dialogs in excell | Excel Worksheet Functions | |||
code to delete rows | Excel Discussion (Misc queries) | |||
Code not going to next unused row | Excel Programming |