Re : Obtenir des coordonnées de cellule/colonne par VBA
Sub Enregistrer_modifications_immeuble()
noIm = InputBox("Veuillez saisir le n° de l'actif pour confirmer l'enregistrement des modifications.")
Sheets("Choix").Select
Range("E17") = noIm
Sheets("Extraction Informations").Select
Range("C:C").Copy
Dim Cel As Range
Dim Val As Range
With Sheets("Choix")
Set Val = .Range("E17") 'définit l'adresse à rechercher
End With
Sheets("DataBase").Select
Set Cel = Cells.Find(Val)
If Not Cel Is Nothing Then
Cells(1, Cel.Column).Resize(Cells(Rows.Count, Cel.Column).End(xlUp).Row).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Sheets("Extraction Informations").Select
Range("A1").Select
MsgBox "Modifications enregistrées"
End If
End Sub
Macro finie et fonctionnelle, j'ai posé l'inconnu dans une cellule et je suis passé par une recherche.
Bonne journée à tous,
Tos