Paste to visible cell.

  • I am using a loop to look for a range of cells based on certain criteria and then trying to copy that range to the first visible empty cell in Column H starting at cell H4. Each time the routine goes through the loop, it should paste the found range to the next visible and empty cell below. I am using the following code but I am missing the part that finds the first visible cell below H4. Any suggestions would be greatly appreciated.


    [VB]
    'Copies Teams to Team data range.
    Dim bottomF As Long
    bottomF = Range("f" & Rows.count).End(xlUp).Row
    For r = 3 To bottomF
    Set FirstCell = Range("C" & r)
    Set LastCell = Range("F" & r)
    If FirstCell Like "*Total*" And LastCell > 2 Then
    Range(FirstCell, LastCell).Copy
    ActiveSheet.Range("H1").End(xlDown).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
    End If
    Next
    [/VB]

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Re: Paste to visible cell.


    Does this help?

  • Re: Paste to visible cell.


    Once again you have come to my rescue, jindon. It worked like a charm. Thank you so much.

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.