Sub PressPapExcel()
Dim actCell As Range, sx As Worksheet, xrg As Range, x, rep
Application.ScreenUpdating = False
Set actCell = ActiveCell
Set sx = Worksheets.Add
On Error GoTo Err1
sx.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
Set xrg = Selection
If Not xrg Is Nothing Then
'confirmation
Application.ScreenUpdating = True: DoEvents
rep = MsgBox("Voici ce qu'on va coller sur la plage filtrée." & vbLf & vbLf & _
"Voulez-vraiment coller ces cellules ?", vbQuestion + vbYesNo + vbDefaultButton2)
Application.ScreenUpdating = False
If rep = vbYes Then
For Each x In xrg.Columns(1).Cells
Do While actCell.EntireRow.Hidden = True: Set actCell = actCell.Offset(1): Loop
actCell.Resize(, xrg.Columns.Count) = x.Resize(, xrg.Columns.Count).Value
Set actCell = actCell.Offset(1)
Next x
End If
End If
Application.DisplayAlerts = False: sx.Delete: Application.DisplayAlerts = True
Exit Sub
Err1:
' à priori peut-être pas en provenance de gogole mais d'Excel peut-être
sx.Paste
Resume Next
End Sub