【发布时间】:2017-01-10 12:33:08
【问题描述】:
在代码方面我完全是个菜鸟,所以对你即将看到的内容表示歉意。
我有一个工作簿,其中列出了供应商的订单及其价值。我正在尝试创建一个执行以下操作的宏,但我遇到了障碍。
我希望宏检查活动行的单元格 B,然后访问它们的超链接工作簿并在活动行的单元格 D 中输出 =MAX 值。
Sub Find_PO_Total()
Range("Supplier" & ActiveCell.Row).Select
If Range("Supplier" & ActiveCell.Row) = "Supplier1, Supplier2" Then
Range("Value" & ActiveCell.Row).Max ("_hyperlink_here_!G1:G709")
ElseIf Range("Supplier" & ActiveCell.Row) = "Supplier3" Then
Range("Value" & ActiveCell.Row).Max ("_hyperlink_here_!H1:H709")
ElseIf Range("Supplier" & ActiveCell.Row) = "Supplier4, Supplier5" Then
Range("Value" & ActiveCell.Row).Max ("_hyperlink_here_!I1:I709")
End If
End Sub
【问题讨论】:
标签: excel hyperlink macros max vba