我有一份调查问卷。在第一列中有一些标识号。其他三列包含可能的答案。我需要确保当我单击带有答案选项的列下的某个单元格时,此行中会出现一个标识号。我理解如何在特定情况下做到这一点,但不能将其扩展到所有行。
例如,我在A2-A10行中有2-10个数字。我还有B1-D1列标题和答案。我点击B2,"2“被放入B2单元格中。在下一行,我点击了D3,"3“被放入了D3单元格中。
发布于 2021-03-07 17:39:53
这对我很有帮助。
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, rng) Is Nothing Then
With ActiveWindow
actRow = ActiveCell.Row
If ActiveCell.Value = Cells(actRow, 1) Then
ActiveCell.ClearContents
Else
ActiveCell.Value = Cells(actRow, 1)
End If
End With
End If
End Subhttps://stackoverflow.com/questions/66514759
复制相似问题