View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
KelliInCali KelliInCali is offline
external usenet poster
 
Posts: 37
Default VB code for selecting all rows below filled column

Hi Bernie,

Thanks... Can you tell me what Dims and Sets I would need with this? It
doesn't seem to do anything. See my expl to Ron if it helps give an idea of
what I'm doing.

Here is macro I've recorded to convert TabDel data to columns and then sort
by B. From here I do manually what I expl to Ron.

Rows("1:3").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"),
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(3, 1), Array(11, 1), Array(13,
1), Array(29, 1), _
Array(50, 1), Array(63, 1), Array(69, 1), Array(74, 1), Array(75,
1), Array(83, 1), Array( _
90, 1), Array(91, 1), Array(101, 1), Array(108, 1)),
TrailingMinusNumbers:=True
Cells.Select
Selection.Sort Key1:=Range("B1"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Range("B1").Select
Range(Selection, Selection.End(xlDown)).Select



"Bernie Deitrick" wrote:

Kelli,

Range(Range("B65536").End(xlUp)(2), Range("B65536")).EntireRow.Delete

HTH,
Bernie
MS Excel MVP


"KelliInCali" wrote in message
...
Hi. I need to delete data in all the rows below the last filled row for
column B. Can anyone give me code for that? Thanks in advance, Kelli