Results 1 to 2 of 2
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copy only visible cells (2000 sr-1)

    I have arranged old code to copy with unique value in J of sheet GRUPPO the value filtered from sheet L0953 but not work correct.... in effect the code copy also cells not in visible cells...
    In effect i want to copy after the filter in D of sheet L0953 the unique vlaue in J of GRUPPO other way is welcome

    Sub FILTRA_UNICO_L0953()
    'SOSPESI
    Dim Y, F As Integer, K As Range, UniqAr, ULTIMA As String

    ULTIMA = Sheets("L0953").Cells(65536, 4).End(xlUp).Row '+ 1

    Set K = Sheets("L0953").Range("D3" & ULTIMA)
    ReDim Y(1 To K.Rows.COUNT)
    Y = Application.Transpose(K)
    ReDim UniqAr(1 To 1)
    For F = 1 To UBound(Y)
    If IsError(Application.Match(Y(F), UniqAr, 0)) Then
    UniqAr(UBound(UniqAr)) = Y(F)
    ReDim Preserve UniqAr(1 To UBound(UniqAr) + 1)
    End If
    Next

    ReDim Preserve UniqAr(1 To UBound(UniqAr) - 1)

    With Sheets("GRUPPO")
    Sheets("GRUPPO").Range("J2:J50000").ClearContents
    Sheets("GRUPPO").[J2].Resize(UBound(UniqAr)) = Application.Transpose(UniqAr)
    End With

    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Copy only visible cells (2000 sr-1)

    You should ask the person who wrote the code for you how to solve this.

Posting Permissions

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