I thought I had this working. I tested this at work and brought the workbook home, to do a little extra work. But when I ran the macro at home, I get an error when using this function:
value = WorksheetFunction.Average(Range("'LV_new.csv'!C2:C100").Offset(0, (i - 1) * 5))
The error I get is: "Unable to get the Average property of the WorksheetFunction class"
If I remove the filename and just leave the range, it works but operates on the current worksheet. I need the average function to reference data in a different workbook; not just a different worksheet. Should this work as written? Why would it work on one computer but not another?
Anyone have a suggestion or better way of using this function on a range in a different workbook?
Thanks,
Bookmarks