You're right. I think the best way to work with that stuff is to have a worksheet and custom function
This code works for me
Function fstr(a As Integer, m As Integer)
Sheets("sfactors").Visible = False
Sheets("sfactors").Activate
Set r = Cells(1, 1)
fstr = Range(r(a, m + 1).Address).Value
End Function
But if I want to do it without hiding the list it dosent work
Function fstr(a As Integer, m As Integer)
'Sheets("sfactors").Visible = False
'Sheets("sfactors").Activate
Set r = ThisWorkbook.Sheets("sfactors").Cells(1, 1)
fstr = Range(r(a, m + 1).Address).Value
End Function
What's wrong with the second one? In this case, I had to manually select sfactors list.
Regards, Alex