Are you trying to return a value to Cells(1,k) or the formula "=index(...)"?
If a value, maybe:
With Workbooks(filenameonly(FMCFilenameOldRel).Workshee ts("database"))
ActiveSheet.Cells(l, k).Value = _
Application.Index(.Range("i2:bq2972"), _
Application.Match(ActiveSheet.Cells(l, 9).Value, _
.Range("aletters"), False), _
Application.Match(ActiveSheet.Cells(1, k).Value, _
.Range("bletters"), False))
End With
But I wasn't sure what the cells referred to, so I chose the activesheet???
Kuba wrote:
i managed to get this macro working on a small database (6 by 10 instead of 3000 by 70), but it breaks down on a large scale file. "Method RANGE of object _GLOBAL failed".
I looked at the next post - about similar type of error reported, but i have no clue what i can qualify in the statement...
Cells(l, k).Formula = _
Application.Index(Workbooks(FileNameOnly(FMCFilena meOldRel)).Worksheets("DATABASE").Range("i2:bq2972 "), _
Application.Match(Cells(l, 9).Value, Range("aletters"), False), _
Application.Match(Cells(1, k).Value, Range("bletters"), False)).Formula
I am as confused as a baby in a topless bar
--
Dave Peterson