The following sub is fed a sheet #, a high row, and a low row. It then
searches on that sheet, between the high and low row (in a given
column) and returns the most common word.
However, when I run it I get an "Object required" error pointing at the
getgenre.formulaarray = Worksheet..... line. Can someone help, what am
I doing wrong?
Thanks!
Phil
Function getgenre(shtno, highrow, lowrow)
genreloccol = 2
evalrange = Range(Worksheets(shtno).Cells(highrow, genreloccol),
Worksheets(shtno).Cells(lowrow, genreloccol))
getgenre.FormulaArray = Worksheet.Function.Index(evalrange,
Worksheet.Function.Match(Worksheet.Function.Max(Worksheet.Function.CountIf(evalrange),
Worksheet.Function.CountIf(evalrange), 0)))
End Function
Bookmarks