Excel,多个单元格,一个值 [英] Excel, multiple cells, one value

查看:84
本文介绍了Excel,多个单元格,一个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道从谷歌搜索的起点...我有一本工作簿,想在不同的图纸上有2个单元格,如果其中一个被更新,另一个也要更新.但是我希望能够更改一个单元格和另一个来更新...这可能吗?

I had no idea where to start in Googling... I have a workbook and want to have 2 cells on different sheets where if one is updated, so is the other. However I want to be able to change either cell and the other to update... Is this possible?

推荐答案

在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.

这篇关于Excel,多个单元格,一个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆