[:27] ,如果是A1到Z1都要显示后面的数据呢.
下面的语句那里出了问题
Dim i As Integer
Dim j As Integer
Private Sub Worksheet_Change(ByVal Target As Range)
For i = 2 To 26
For j = 0 To 25
If Target = Cells(j, i).Value Then
Line = "a" + j
LineNane = Line & "1"
Range(LineName).Value = Cells(j, i).Value
'Range("a1").Value = Cells(1, i).Value
End If
Next
Next
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
'一行
'For i = 2 To 26
' If Target = Cells(1, i).Value Then
' Cells(1, i).Value= Cells(1, i).Value
' End If
'Next
'多行
For j = 1 To 30
For i = 2 To 26
If Target = Cells(j, i).Value Then
Cells(j, 1).Value = Cells(j, i).Value
End If
Next
Next
End Sub