Results 1 to 3 of 3

Thread: Select rows with data in column A5 down then resize to 11 columns along (K)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hi, All sorted. Think the problem was i was trying to resize the selection rather than the current range.
    Code:
    With ShipmentTimelinessWeekPrevious.Sheets("Data")
    Dim RowHeight As Range
    Set RowHeight = Range(Range("A5"), Range("A5").End(xlDown))
        RowHeight.Resize(, RowHeight.Columns.Count + 10).Select

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    10
    Rep Power
    0
    Code:
    Range(Cells(5,1), Cells(Rows.Count, "A").End(xlUp)).Resize(,11).Select
    This should replace the two lines of code. Select is very seldom needed and you should see if you can adapt the code.
    Using xlDown could be dangerous if there is a blank cell in the range.

Similar Threads

  1. seprate data in rows to columns
    By CORAL in forum Excel Help
    Replies: 2
    Last Post: 03-10-2014, 08:18 AM
  2. Replies: 1
    Last Post: 10-25-2013, 10:37 PM
  3. Replies: 6
    Last Post: 08-14-2013, 04:25 PM
  4. Replies: 3
    Last Post: 07-29-2013, 11:32 PM
  5. Move data from rows into columns for every unique value
    By mahmoud-lee in forum Excel Help
    Replies: 4
    Last Post: 06-13-2013, 03:02 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •