I can't see the problem with this formula but I get the following error message.
Method range of object global failed
Thanks in advance![]()
Range("AW3:AW" & SecondLastRow - 1) = "=VLOOKUP(AT3,Range(""J3:J"" & LastRow - 1),8,FALSE)"
I can't see the problem with this formula but I get the following error message.
Method range of object global failed
Thanks in advance![]()
Range("AW3:AW" & SecondLastRow - 1) = "=VLOOKUP(AT3,Range(""J3:J"" & LastRow - 1),8,FALSE)"
Try Range("AW3:AW" & SecondLastRow - 1).value
Elegant Simplicity............. Not Always
I found the problem. I had not used Dim for SecondLastRow. I have used the following code to select two entire columns:, but get an error message. Can someone correct this please?![]()
Columns("S:S", "AW:AW").Select
I am now getting this formula in the cell range?
=VLOOKUP(AT3,Range("J3:J" & LastRow - 1),8,FALSE)
Thanks in advance
The formula reflects #NAME? in the cells. It is not selecting my LastRow range?
Thanks in advance
I changed the code as follows but get the following error: [Object variable or With block Variable not set]:
Thanks in advance![]()
LookupRange = Range("J3:J" & LastRow - 1) Range("AW3:AW" & SecondLastRow - 1).Value = "=VLOOKUP(AT3,LookupRange,8,FALSE)"
This is the code I am using but the formula in the cell uses [LookupRange] instead of the range J3:J2565?
Thanks in advance![]()
Dim LookupRange As Range Set LookupRange = Range("J3:J" & LastRow - 1) Range("AW3:AW" & SecondLastRow - 1).Value = "=VLOOKUP(AT3,LookupRange,8,FALSE)"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks