[英]excel copy/paste cell to cell using address in another cell
How to Copy/Paste a value from 1 cell to 2nd Cell using a 3rd Cell which holds the address of the 2nd Cell.如何使用保存第二个单元格地址的第三个单元格将值从 1 个单元格复制/粘贴到第二个单元格。 I want to trigger the copy/past action by a 4th Cell going 'true'.
我想通过第 4 个单元格变为“真”来触发复制/过去操作。 I do not want to use VB as I am not competent with it.
我不想使用 VB,因为我不胜任它。
You will need to use VBA I think.我认为您将需要使用 VBA。 The only way to get a cell to show a value other than by programming is to enter a formula into your 2nd cell - but by definition you don't know what that is.
让单元格显示值而不是通过编程的唯一方法是在您的第二个单元格中输入一个公式 - 但根据定义,您不知道那是什么。 Assume that A1 holds the value to copy, A3 is the cell holding the cell address and A4 is the true/false cell.
假设 A1 保存要复制的值,A3 是保存单元格地址的单元格,A4 是真/假单元格。 Then you need this code in the module page of the sheet you wish to affect:
然后,您需要在要影响的工作表的模块页面中使用此代码:
Private Sub Worksheet_Calculate()
If range("a4") then
range(range("a3").text).value = range("a1").value
End If
End Sub
Note this will error if A3 doesn't hold a valid cell address请注意,如果 A3 没有有效的单元格地址,这将出错
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.