excel - 根据选择的超链接更新单元格值
问题描述
我正在尝试在下面的链接中调整代码。
我需要它,在我的第一张表中,当在 F 列中单击超链接(链接到第二张表“定价”)时,A 列中相应单元格的值将打印在定价表的 C 列中。
例子:
- 在第一张表中,F6 中的超链接指向定价工作表
- 单击超链接时,第一张表中的单元格值 A6 将打印在定价工作表的单元格 C6 中。
https://www.techonthenet.com/excel/hyperlinks/update_cell2013.php
该代码基于一个平面值,我需要它在每一行上动态工作:
If Sh.Name = "First Sheet" Then
If GSourceCell = "F6" Then
Sheets("Pricing").Range("C6").Value = Sheets("First Sheet").Range("A6")
解决方案
我希望这有帮助:
If Sh.Name = "First Sheet" Then
If GSourceCell = "F" & ActiveCell.Row Then
Sheets("Pricing").Range("C & ActiveCell.Row").Value = Sheets("First Sheet").Range("A" & ActiveCell.Row)
推荐阅读
- angular - How can I display a specific child component inside a parent component with its own routing in Angular?
- node.js - Not Found Status :404
- sql - 用单元格值替换 SQL 命令中的 DECLARE
- node.js - Gremlin NodeJS 查询返回的结果与 Groovy 不同
- c - C中快速排序的并行化
- python - 如何在seaborn barplot中使用NaN值作为具有定义颜色的色调
- python - 插入数据库时如何避免(或解决)唯一约束冲突?
- python - 查找列表中的最大元素
- c++ - 链接器找不到 .lib 文件
- ruby-on-rails - Ruby on rails 拒绝连接博客