简体   繁体   English

excel使用另一个单元格中的地址将单元格复制/粘贴到单元格

[英]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.

相关问题 如何将公式驱动的单元格复制并粘贴到另一个单元格中作为Excel中的值 - How to copy and Paste a formula driven cell to another cell as values in Excel Excel宏,要基于另一个单元格值复制和粘贴单元格值? - Excel macro, to copy and paste a cell value based on another cell value? 用于使用另一个单元格中包含的文本引用单元格地址的 Excel 公式 - Excel Formula for referencing a cell address using text contained in another cell 使用Excel VBA删除地址位于另一个单元格中的单元格 - Delete cell in which address is in another cell using excel vba Excel宏复制单元格范围并将数据粘贴到另一个工作表 - Excel Macro Copy cell range & paste data one sheet to another Excel VBA - 将每个单元分别复制并粘贴到另一个程序 - Excel VBA - Copy and Paste each cell Individually to another program Excel-复制选定的单元格并粘贴到另一个工作表中列的末尾 - Excel - Copy selected cell and paste to the end of a column in another worksheet Excel VBA复制/粘贴范围到另一个工作表中的下一个可用单元格 - Excel VBA Copy/Paste Range to the next available cell in another worksheet Excel VBA将特定的单元格复制并粘贴到另一个工作表 - Excel VBA copy and paste a specific cell to another Sheet Excel VBA:从另一个工作簿循环中复制和粘贴特定单元格 - Excel VBA: Copy and Paste Specific Cell from Another Workbook Loop
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM