且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Excel,多个单元格,一个值

更新时间:2023-02-04 20:16:36

在Excel中打开您的VB编辑器,并在受影响的每个工作表中使用类似以下的内容,以及更改工作表名称和所需的范围. /p>

Open up your VB editor in Excel and use something like the following in each of the sheets that are affected as well as changing the sheet names and range desired.

Private Sub Worksheet_Change(ByVal target As Range)
    If target.Address = "$A$1" Then
        ActiveWorkbook.Worksheets("Sheet2").Range(target.Address).Value = target.Value
    End If
End Sub

如对James回答的评论中所述,如果没有这么少的代码,这实际上是不可能的,除非您要使用另外两个单元格.

As stated in a comment on James' answer, this is not really possible without this minute amount of code unless you are using two additional cells.