【发布时间】:2015-05-23 07:29:08
【问题描述】:
我想做一个宏来从填充的最后一行运行 vlookup。 下面的代码是得到最后被填充的行(J列)和最后被填充的行(A列),下面的公式就是得到这2列的最后一行;
Sub lookup()
'Find the last Row with data in a Column
'In this example we are finding the last row of column A (Filled) and J (to be filled)
Dim lastRowA As Long
Dim lastRowJ As Long
With ActiveSheet
lastRowA = .Cells(.Rows.Count, "A").End(xlUp).Row
lastRowJ = .Cells(.Rows.Count, "J").End(xlUp).Row
End With
MsgBox lastRowA & " " & lastRowJ
End Sub
vlookup 在列 C 中查找值,并在另一个 Excel 文件 C:\LINKED[Roster_Iloilo.xlsx]ACTIVE' 中查找范围! $C:$E。见File的图片 请在 vlookup 方面需要帮助。
【问题讨论】:
-
如果您手动执行,公式会是什么样子?
-
=vlookup(C40846,'C:\LINKED[Roster_Iloilo.xlsx]ACTIVE'!$C:$E,3,0)