EXCEL表格 如何使某表格李的的批注显示另外几个表格的数据

2025-03-25 23:22:32
推荐回答(3个)
回答(1):

       因为不知道你要显示批注的具体单元格和那6个数据的具体单元格,所以我在此假设要在A1显示批注,批注来源是A10:B12,请你根据自己的具体情况适当更改。步骤如下:

ALT+F11,输入如下代码:

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim strcomment As String
    strcomment = Range("A10").Text & ":" & Range("B10").Text & Chr(13) & Chr(10) & Range("A11").Text & ":" & Range("B11").Text & Chr(13) & Chr(10) & Range("A12").Text & ":" & Range("B12").Text
    If Range("A1").Comment Is Nothing Then
        Range("A1").AddComment
        Range("A1").Comment.Visible = True
        Range("A1").Comment.Text Text:=strcomment
    Else
        Range("A1").Comment.Visible = True
        Range("A1").Comment.Text Text:=strcomment
    End If
End Sub

如下图所示:

 

回答(2):

这个复杂啊。必须用VBA,怎么做得找高人

回答(3):

VBA可以。