After some more help from you excel experts.
I'm trying to make a function and it needs to refer to a variable sheet.
sample code I've tried is:
function test(sheet)
test = sheets(sheet).range(A1).value
end function
but when I try
=test(whatever)
in a cell I get #VALUE every time. If I don't use "" I think it's looking for a cell or range called whatever, if I do use quotes I'm not quite sure what goes wrong.
Any tips?
I'm trying to make a function and it needs to refer to a variable sheet.
sample code I've tried is:
function test(sheet)
test = sheets(sheet).range(A1).value
end function
but when I try
=test(whatever)
in a cell I get #VALUE every time. If I don't use "" I think it's looking for a cell or range called whatever, if I do use quotes I'm not quite sure what goes wrong.
Any tips?
Comment