Trimming Excess Data

P

Phil

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.
 
B

Bernie Deitrick

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 said:
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.
 
T

Tod

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top