Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete rows w/o hardcoding numbers
I'd like to delete a group of rows. Normally I would do:
Rows("12:45").Delete Shift:=xlUp But the row numbers are stored in variables. I can't do (causes an error): Rows("intBeginDelete:intEndDelete").Delete Shift:=xlUp I can do it using a For...Next loop, deleting the rows one at a time, but I'm working with lots of row groups & files and that makes execution slow. Is there an easier/faster way to do this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete rows w/o hardcoding numbers
Rows(intBeginDelete & ":" & intEndDelete).Delete
might work ok. Dave B wrote: I'd like to delete a group of rows. Normally I would do: Rows("12:45").Delete Shift:=xlUp But the row numbers are stored in variables. I can't do (causes an error): Rows("intBeginDelete:intEndDelete").Delete Shift:=xlUp I can do it using a For...Next loop, deleting the rows one at a time, but I'm working with lots of row groups & files and that makes execution slow. Is there an easier/faster way to do this? -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete rows w/o hardcoding numbers
Thanks for the suggestion. It gives me a Type Mismatch error. Any
idea why? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete rows w/o hardcoding numbers
I'd guess that one (maybe both) your variables aren't what you expect:
Dave B wrote: Thanks for the suggestion. It gives me a Type Mismatch error. Any idea why? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
delete rows between tow inputs numbers | Excel Discussion (Misc queries) | |||
locate positive numbers and delete rows containing | Excel Discussion (Misc queries) | |||
Selecting worksheets without hardcoding | Excel Programming | |||
Selecting worksheets without hardcoding | Excel Programming | |||
delete rows without numbers | Excel Programming |