OK tried to get you all the info i could on this fishing through my code.... I am having problems with type mismatches in my application. match lines... I'm not so sure how these things work.. any help would be great.
[VBA] Dim shareClass, packageCode
Dim pkgCodeIndex As Integer, revenueIndex As Integer, nameIndex As Integer, SIAcodeindex As Integer, newFundIndex As Integer, i As Integer
Dim searchRange, resultRange, pkgCodeToRevenue, pkgCodeToName, quoteColumns
pkgCodeToRevenue = Array(2, 11, 20, 20, 29, 29, 38, 38, 38, 47)
pkgCodeToName = Array(23, 24, 25, 25, 26, 26, 27, 27, 27, 28)
If Workbooks(fs).Sheets("Quote").Cells(Fundname, 14).Value = "" Then
newFundIndex = Application.Match(Workbooks(fs).Sheets("Quote").Cells(13, 14).Value, Workbooks(fs).Sheets("Share Class info").Range("B13:K13"))
shareClass = Workbooks(fs).Sheets("Share Class info").Cells(Fundname, newFundIndex + 1).Value
Else
shareClass = Workbooks(fs).Sheets("Quote").Cells(Fundname, 14).Value ' Get share class name
End If
pkgCodeIndex = Application.Match(shareClass, searchRange, 0)
packageCode = Application.Index(resultRange, pkgCodeIndex)
' Using the package code index number, we map to a column in the revenue sheet
revenueIndex = pkgCodeToRevenue(pkgCodeIndex - 1)
nameIndex = pkgCodeToName(pkgCodeIndex - 1)
SIAcodeindex = pkgCodeToName(pkgCodeIndex - 1) + 6 + 7 * Sheets("Quote").Range("RPRev").Value[/VBA]