+ Reply to Thread
Results 1 to 8 of 8

Using offset to select next empty cell

Hybrid View

NewExcelUser Using offset to select next... 05-02-2007, 03:46 AM
Leith Ross Hello NewExcelUser, The... 05-02-2007, 04:04 AM
NewExcelUser Hi Leith, Thanks for the... 05-02-2007, 04:14 AM
Leith Ross Hello NewExcelUser, Use... 05-02-2007, 03:08 PM
NewExcelUser Hi Leith, Thank you for... 05-02-2007, 04:45 PM
peejay try this 05-02-2007, 05:36 PM
NewExcelUser Ok, I can live with that :) ... 05-02-2007, 06:30 PM
mikerickson Dim xRange As Range Set... 05-02-2007, 06:32 PM
  1. #1
    Forum Contributor
    Join Date
    10-04-2006
    Posts
    151
    Hi Leith,

    Thank you for your reply.

    The code copies the cell just fine, but does not offset to the next row. It just copies over the previous entry.

    Thanks again.

  2. #2
    Forum Contributor
    Join Date
    09-28-2006
    Posts
    122

    try this

    the problem occurs if the column begins empty. the code will return a 1 as the initial answer and then every answer thereafter will be 1 so it never increments itself.

    the following code will do as you wish but the list will start from row 2 downwards

    let me know how you go

    code=
    Dim LastRow As Long
    LastRow = Sheet10.Cells(Rows.Count, "A").End(xlUp).Row
    If LastRow >= 1 Then LastRow = LastRow + 1
    Sheet14.Range("k1").Copy Destination:=Sheet10.Cells(LastRow, "A")

  3. #3
    Forum Contributor
    Join Date
    10-04-2006
    Posts
    151
    Ok, I can live with that

    Thanks everyone

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Dim xRange As Range
    Set xRange = Sheet10.Range("a1").End(xlUp)
    If xRange.Value <> "" Then Set xRange = xRange.Offset(1,0)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1