Bonsoir,
je souhaite sélectionner 2 plages de cellule pour ensuite les réutiliser dans la formule du coefficient de correlation.
J'ai écrit cela dans le code associé au userform:
Private Sub CommandButton1_Click()
Dim selrange As Range
Dim plagedonneea As String
Dim plagedonneeb As String
plagedonneea = RefEdit1.Value
plagedonneeb = RefEdit2.Value
Set selrange = Range(plagedonneea)
selrange2 = Range(plagedonneeb)
'Range("addr").Select
'Selection.Copy
'Range("A1").Select
'Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, transpose:=True
'Application.CutCopyMode = False
Range("D12") = "=CORREL(plagedonneea,plagedonneeb)"
Me.Hide
End Sub
Private Sub CommandButton3_Click()
Me.Hide
End Sub
Private Sub RefEdit1_BeforeDragOver(Cancel As Boolean, ByVal Data As MSForms.DataObject, ByVal x As stdole.OLE_XPOS_CONTAINER, ByVal y As stdole.OLE_YPOS_CONTAINER, ByVal DragState As MSForms.fmDragState, Effect As MSForms.fmDropEffect, ByVal Shift As Integer)
End Sub
Private Sub RefEdit2_BeforeDragOver(Cancel As Boolean, ByVal Data As MSForms.DataObject, ByVal x As stdole.OLE_XPOS_CONTAINER, ByVal y As stdole.OLE_YPOS_CONTAINER, ByVal DragState As MSForms.fmDragState, Effect As MSForms.fmDropEffect, ByVal Shift As Integer)
End Sub
La formule se copie bien dans le cellule D12 mais excel écrit l'erreur " #NOM? "
Pouvez vous m'aidez
Cordialement
je souhaite sélectionner 2 plages de cellule pour ensuite les réutiliser dans la formule du coefficient de correlation.
J'ai écrit cela dans le code associé au userform:
Private Sub CommandButton1_Click()
Dim selrange As Range
Dim plagedonneea As String
Dim plagedonneeb As String
plagedonneea = RefEdit1.Value
plagedonneeb = RefEdit2.Value
Set selrange = Range(plagedonneea)
selrange2 = Range(plagedonneeb)
'Range("addr").Select
'Selection.Copy
'Range("A1").Select
'Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, transpose:=True
'Application.CutCopyMode = False
Range("D12") = "=CORREL(plagedonneea,plagedonneeb)"
Me.Hide
End Sub
Private Sub CommandButton3_Click()
Me.Hide
End Sub
Private Sub RefEdit1_BeforeDragOver(Cancel As Boolean, ByVal Data As MSForms.DataObject, ByVal x As stdole.OLE_XPOS_CONTAINER, ByVal y As stdole.OLE_YPOS_CONTAINER, ByVal DragState As MSForms.fmDragState, Effect As MSForms.fmDropEffect, ByVal Shift As Integer)
End Sub
Private Sub RefEdit2_BeforeDragOver(Cancel As Boolean, ByVal Data As MSForms.DataObject, ByVal x As stdole.OLE_XPOS_CONTAINER, ByVal y As stdole.OLE_YPOS_CONTAINER, ByVal DragState As MSForms.fmDragState, Effect As MSForms.fmDropEffect, ByVal Shift As Integer)
End Sub
La formule se copie bien dans le cellule D12 mais excel écrit l'erreur " #NOM? "
Pouvez vous m'aidez
Cordialement