0
當涉及到代碼時,我是一個總的noob,因此對於您即將看到的內容表示歉意。在使用某些變量的外部工作簿上使用= MAX
我有一份工作簿,其中包含來自供應商的訂單清單及其價值。我正在嘗試創建一個可以執行以下操作的宏,但是我正遇到一堵磚牆。
我所需的宏檢查活動行的小區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