MarkNumskull
08-13-2009, 01:27 PM
Hi,
Turns out vlookup in vba can be a bit of nightmare compared to normal excel vlookup if your like me and never used it before! Iv been trying to get the following one to work and have no yet succeeded so i have resorted to swearing at the computer, obv this hasn't helped me so perhaps one of you could help out? what am i doing wrong with the following?
ActiveCell.Offset(0, 3).Value = Application.WorksheetFunction.VLookup(ActiveCell.value, thisworkbook.Sheets("Sheet2").Range("$b$2:$h$65000"), 3, False)
what i want it to do is take the active cells value say 1 then go into the table on worksheet 2 and find the corresponding value and input it into the cell 3 rows away from the activecell on worksheet 3.
cheers,
Mark
Turns out vlookup in vba can be a bit of nightmare compared to normal excel vlookup if your like me and never used it before! Iv been trying to get the following one to work and have no yet succeeded so i have resorted to swearing at the computer, obv this hasn't helped me so perhaps one of you could help out? what am i doing wrong with the following?
ActiveCell.Offset(0, 3).Value = Application.WorksheetFunction.VLookup(ActiveCell.value, thisworkbook.Sheets("Sheet2").Range("$b$2:$h$65000"), 3, False)
what i want it to do is take the active cells value say 1 then go into the table on worksheet 2 and find the corresponding value and input it into the cell 3 rows away from the activecell on worksheet 3.
cheers,
Mark