| 
    
     |  | この質問の意味として「選択範囲は常に1列、その列の先頭行の値と、各行のA列 の値を引数とする関数を作る」ということでいいのかな ?
 そうするとコードは基本的に・・
 
 Dim C As Range
 Dim Dt1 As Variant, Dt2 As Variant, Dt3 As Variant
 
 If TypeName(Selection) <> "Range" Then Exit Sub
 With Selection
 If Not Intersect(.Cells, Range("B2:D15")) Is Nothing Then
 If .Count > Intersect(.Cells, Range("B2:D15")).Count Then
 Exit Sub
 End If
 If .Columns.Count > 1 Then Exit Sub
 Else
 Exit Sub
 End If
 For Each C In .Cells
 Dt1 = Cells(1, C.Column).Value
 Dt2 = C.Value
 Dt3 = Cells(C.Row, 1).Value
 Debug.Print Dt1 & " : " & Dt2 & " : " & Dt3
 Next
 End With
 
 というようにして、イミディエイトウィンドウで確認してみて下さい。
 
 |  |