Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Match WorksheetFunction Question
This is my first time using a WorksheetFunction, so I'm not sure what this error message means. The problem code is: MyCell.Offset(i - 1, 0).Value = Application.WorksheetFunction.index _ (IRange, 1, Application.WorksheetFunction.Match(Lvalue, Vrange, _ False)) ....and it comes up with the error message: "Unable to get the Match property of the WorksheetFunction class" Thanks for your help! Alex P.S. This is a continuation of a previous question - for Gary: Thank you! You were completely right. "Gary Keramidas" wrote: it looks like it's doing what you want: type or paste these 3 lines in the immediate window , pressing enter after each one, and see what the range is for irange i =5 Set IRange = Sheets("Historical Load").Range("C1:BA1").Offset(i - 1,0) ?irange.address then change the value of i and try again. immediate window is accessed by Control-G or view/immediate window from the menu in the vb editor -- Gary "awright" wrote in message ... Here's what I have so far: Lvalue = Sheets("Historical Load").Range("A2").Value Set IRange = Sheets("Historical Load").Range("C1:BA1").Offset(i - 1, 0) Set Vrange = Sheets("Historical Load").Range("C8:BA8") Set MyCell = Sheets("Nomination").Range("H1") MyCell.Offset(i - 1, 0).Value = Application.WorksheetFunction.index _ (IRange, 1, Application.WorksheetFunction.Match(Lvalue, Vrange, False)) This is part of a For - Next loop, where i is an integer. In that second row, I want to Offset that entire range ("C1:BA1") by the amount i - 1. I think it's not working because Offset is usually for a single cell. Does anyone have any suggestions for getting this to work? Thanks! Alex |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
worksheetfunction.match | Excel Programming | |||
Re : Excel VBA and WorkSheetFunction (Match) | Excel Programming | |||
Syntax for WorksheetFunction Match | Excel Programming | |||
worksheetfunction.match | Excel Programming | |||
Worksheetfunction MATCH | Excel Programming |