XL 2016 Vba: copier et coller sans formule

Guismo33

XLDnaute Occasionnel
Bonjour à tous,
en cherchant sur le forum, j'ai réussis a faire ma macro, elle fonctionne mais
je voudrais faire un copier et coller sans les formules, ce qui n'est pas la cas ici
je fait appel car la je sèche.


Dim i As Integer, lig As Long, lig2 As Long
With Sheets("R2")
col = .Cells(3, Columns.Count).End(xlToLeft).Column + 1
.Range("Selection2").Copy Destination:=.Cells(3, col)
.Cells(3, col) = .Range("a1").Value

End With


merci

bien à vous
 

Kael_88

XLDnaute Occasionnel
Le forum,@Guismo33 ,@vgendron ,

il te suffit de rajouté cette ligne avant la ligne de copy
VB:
.Range("Selection2").Formula = .Range("Selection2").Value

ce qui donne:

VB:
Dim i As Integer, lig As Long, lig2 As Long
With Sheets("R2")
col = .Cells(3, Columns.Count).End(xlToLeft).Column + 1

.Range("Selection2").Formula = .Range("Selection2").Value

.Range("Selection2").Copy Destination:=.Cells(3, col)
.Cells(3, col) = .Range("a1").Value

End With

cordialement
 

Guismo33

XLDnaute Occasionnel
Le forum,@Guismo33 ,@vgendron ,

il te suffit de rajouté cette ligne avant la ligne de copy
VB:
.Range("Selection2").Formula = .Range("Selection2").Value

ce qui donne:

VB:
Dim i As Integer, lig As Long, lig2 As Long
With Sheets("R2")
col = .Cells(3, Columns.Count).End(xlToLeft).Column + 1

.Range("Selection2").Formula = .Range("Selection2").Value

.Range("Selection2").Copy Destination:=.Cells(3, col)
.Cells(3, col) = .Range("a1").Value

End With

cordialement
Bonjour kael,

de retour de vacance, cela fonctionne je vous remecie.

bien à vous
 

F22Raptor

XLDnaute Impliqué

Discussions similaires