Hi, i keep receiving the error noted in the thread title and i'm really confused as to why. here is my code.
Range("F4").Select
For ror02 = 1 To Sheets.Count
x = Application.WorksheetFunction.VLookup(CDate("2/01/2002"), A1:F3000, 5, False)
y = Application.WorksheetFunction.VLookup(CDate("28/02/2002"), Sheet1, 5, False)
ActiveCell.Value = (y - x) / x
ActiveCell.Offset(1, 0).Activate
Next ror02
i am trying to run a loop, to collect data through multiple worksheets to do some short calculations and have it come up on a 'master' worksheet. hopefully the problem can be resolved, thanks in advance.
Range("F4").Select
For ror02 = 1 To Sheets.Count
x = Application.WorksheetFunction.VLookup(CDate("2/01/2002"), A1:F3000, 5, False)
y = Application.WorksheetFunction.VLookup(CDate("28/02/2002"), Sheet1, 5, False)
ActiveCell.Value = (y - x) / x
ActiveCell.Offset(1, 0).Activate
Next ror02
i am trying to run a loop, to collect data through multiple worksheets to do some short calculations and have it come up on a 'master' worksheet. hopefully the problem can be resolved, thanks in advance.