Consulting

Results 1 to 2 of 2

Thread: Paste to row problem

  1. #1
    Banned VBAX Regular
    Joined
    Aug 2010
    Posts
    54
    Location

    Paste to row problem

    Can't seem to work this out - I'm trying to copy userform values to a sheet but with the following criteria;

    1) Each cell from C4 down is NOT empty
    2) For each of those cells, the adjacent cell in column D IS empty

    I've played around with this but it just keeps overwriting my existing data in column C.

    Dim lr As Long, c As Range
    
    lr = Sheets("Packs").Cells(Rows.Count, 3).End(xlUp).Row
    
    For Each c In Sheets("Packs").Range("C4:C" & lr)
    If c.Value <> 0 Then
    c.Offset(, 1) = ComboBox4.Value
    c.Offset(, 2) = ComboBox3.Value
    c.Offset(, 3) = TXTCOMMENTS.Value
    c.Offset(, 4) = TextBox3.Value
    c.Offset(, 5) = TextBox10.Value
    End If
    Next c
    Posted elsewhere too:

    http://www.mrexcel.com/forum/excel-q...ml#post4266350

  2. #2
    Banned VBAX Regular
    Joined
    Aug 2010
    Posts
    54
    Location
    Solved elsewhere

Posting Permissions

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