![](/img/trans.png)
[英]Excel VBA - Copy Cell Value, if empty, to another Cell in the same row
[英]Use vba to copy value of cell to another cell
我一直没有找到一个简单的将特定单元格的值写入另一个单元格的vba脚本的运气。 我在这里找到了下面的代码,但是它似乎没有作用。 我真正想做的是不断将单元格G22的值放在单元格F15中。
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G22")) Is Nothing Then
Range("F15") = Range("G22")
End If
End Sub
这应该工作。
Range("F15").Value = Range("G22")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.