ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Trimming Excess Data (https://www.excelbanter.com/excel-programming/282435-trimming-excess-data.html)

Phil

Trimming Excess Data
 
My worksheet loks like

# Group FirstName LastName Scor

1 A John Jones
2 A Bill Brown
3 A Sue Harper
4 A Mary Rae
5 A Sal Pacino
6
7
8

My data varies from 200 rows to 250 rows and I need to peform a Selection.End(xlDown).Select in the FirstName column (to Sal), then go down 1 more row and select the contents of the # and Group columns (from 6 A to 8 A). Then I need to clear the contents of these cells

Any help would be greatly welcomed.

Bernie Deitrick[_2_]

Trimming Excess Data
 
Phil,

Lots of different ways. Here's one, assuming your data starts in A1,
and there aren't any other blanks in your data set:

Range(Range("C1").End(xlDown)(2),
Range("A1").End(xlDown)).EntireRow.Delete

HTH,
Bernie
MS Excel MVP

"Phil" wrote in message
...
My worksheet loks like:

# Group FirstName LastName Score

1 A John Jones 9
2 A Bill Brown 8
3 A Sue Harper 8
4 A Mary Rae 7
5 A Sal Pacino 4
6 A
7 A
8 A


My data varies from 200 rows to 250 rows and I need to peform a

Selection.End(xlDown).Select in the FirstName column (to Sal), then go
down 1 more row and select the contents of the # and Group columns
(from 6 A to 8 A). Then I need to clear the contents of these cells.

Any help would be greatly welcomed.




Tod[_3_]

Trimming Excess Data
 
Assuming that the column is C:

ActiveSheet.Range("C65536").End(xlup).Select

This will select the last cell in that column that has a
value. The statement does the same as if you were go to
the last cell in column C and then click Ctrl+Up Arrow.


tod

-----Original Message-----
My worksheet loks like:

# Group FirstName LastName Score

1 A John Jones 9
2 A Bill Brown 8
3 A Sue Harper 8
4 A Mary Rae 7
5 A Sal Pacino 4
6 A
7 A
8 A


My data varies from 200 rows to 250 rows and I need to

peform a Selection.End(xlDown).Select in the FirstName
column (to Sal), then go down 1 more row and select the
contents of the # and Group columns (from 6 A to 8 A).
Then I need to clear the contents of these cells.

Any help would be greatly welcomed.
.



All times are GMT +1. The time now is 04:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com