我无法让我的宏在第 2 行的每一列中放置一个 vlookup
I cannot get my macro to put a vlookup in each column of row 2
我目前有两个 sheet 用户数据,一个来自活动目录,另一个来自基于网络的导出。
我的宏应该在 B2:B24 中放置一个 vlookup 函数,其中列 return 上升一个
EG:
Dim beginPosition As Integer
For beginPosition = 1 To 24
Range(& beginPosition, "2").Select
=VLOOKUP($A2,Sheet2!$A:$X00,& beginPosition &,FALSE)
Next begin Position
也许我想多了,可以使用 Vlookup 以外的东西从我的网络导出中获取所有数据 sheet,但现在我很困惑。
提前致谢
无需循环即可实现此目的
Range("B1:B24").Formula = "=VLOOKUP($A2, Sheet2!$A:$X00, ROW(),FALSE)"
我目前有两个 sheet 用户数据,一个来自活动目录,另一个来自基于网络的导出。
我的宏应该在 B2:B24 中放置一个 vlookup 函数,其中列 return 上升一个
EG:
Dim beginPosition As Integer
For beginPosition = 1 To 24
Range(& beginPosition, "2").Select
=VLOOKUP($A2,Sheet2!$A:$X00,& beginPosition &,FALSE)
Next begin Position
也许我想多了,可以使用 Vlookup 以外的东西从我的网络导出中获取所有数据 sheet,但现在我很困惑。
提前致谢
无需循环即可实现此目的
Range("B1:B24").Formula = "=VLOOKUP($A2, Sheet2!$A:$X00, ROW(),FALSE)"