Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Goto end of data & select all rows below
Hi,
could somebody help me some code? I can go to the last cell but i am not sure how to select all rows below, as i have to delete them. Tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Goto end of data & select all rows below
Dim rng as Range
set rng = Cells(1,1).End(xlup)(2) Range(rng,Range("A65536")).EntireRow.delete -- Regards, Tom Ogilvy "Tempy" wrote in message ... Hi, could somebody help me some code? I can go to the last cell but i am not sure how to select all rows below, as i have to delete them. Tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Goto end of data & select all rows below
Hello Tom,
I think i did not make myself clear enough. The data varies in amount of rows, so i cannot set the range to a specific range. Each time the code runs, it has to test to get the range and then delete everyting below the data. Tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Goto end of data & select all rows below
Hello Tom,
I think i did not make myself clear enough. The data varies in amount of rows, so i cannot set the range to a specific range. Each time the code runs, it has to test to get the range and then delete everyting below the data. Tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Goto end of data & select all rows below
sorry - typo
Dim rng as Range set rng = Cells(rows.count,1).End(xlup)(2) Range(rng,Range("A65536")).EntireRow.delete This finds the last filled cell in column A. If you already have a way to find the row to start deleting, then just use that and set the result to the range variable rng. then use Range(rng,Range("A65536")).Entirerow.Delete -- Regards, Tom Ogilvy "Tempy" wrote in message ... Hello Tom, I think i did not make myself clear enough. The data varies in amount of rows, so i cannot set the range to a specific range. Each time the code runs, it has to test to get the range and then delete everyting below the data. Tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Goto end of data & select all rows below
Thank you Tom.
You guys really do a great job. Tempy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to select and copy rows only containing data | Excel Discussion (Misc queries) | |||
How can i randomly select 780 rows from 4000 rows of data | Excel Worksheet Functions | |||
Select certain data rows | New Users to Excel | |||
Select Rows dependant on certain field data | New Users to Excel | |||
Select all data, multiple rows | Excel Discussion (Misc queries) |