Godders199
Active Member
- Joined
- Mar 2, 2017
- Messages
- 313
- Office Version
- 2013
Hello I am struggling to get this vlookup vba to work,
The Submission tab is a table , not range downloaded from adatabase.
I am trying to pull data from column AT, which has the followingformula in it
=SUM(AQ2+AR2+AS2)
When I run this code it returns no results
Dim lastrowcolumnb As Long
lastrowcolumnb = Range("m" &Rows.Count).End(xlUp).Row
For b = 2 To lastrowcolumnA
Set myrange= Worksheets(“submission”).Range(“S:AT”)
Cells(b,29)=Application.worksheetfunction.Vlookup(cells(b,13),myrange,28,False)
Next b
When I type the formula in manually I do get a result
=VLOOKUP(M2,Submission!S:AT,28,FALSE)
Any help appreciated as cannot see a reason for it notworking.
The Submission tab is a table , not range downloaded from adatabase.
I am trying to pull data from column AT, which has the followingformula in it
=SUM(AQ2+AR2+AS2)
When I run this code it returns no results
Dim lastrowcolumnb As Long
lastrowcolumnb = Range("m" &Rows.Count).End(xlUp).Row
For b = 2 To lastrowcolumnA
Set myrange= Worksheets(“submission”).Range(“S:AT”)
Cells(b,29)=Application.worksheetfunction.Vlookup(cells(b,13),myrange,28,False)
Next b
When I type the formula in manually I do get a result
=VLOOKUP(M2,Submission!S:AT,28,FALSE)
Any help appreciated as cannot see a reason for it notworking.