+ Reply to Thread
Results 1 to 8 of 8

Using offset to select next empty cell

Hybrid View

  1. #1
    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")

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

    Thanks everyone

  3. #3
    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