I created this function to get the range from sheets dynamically
function GetSheetRange(j) {
return SpreadsheetApp.getActiveSpreadsheet().getSheets()[j].getRange(3,1,1000,7).getValues()
}
I wanted to use this function in a cell formula for vlookup
VLOOKUP(A28&" "&C28, GetSheetRange(6), 7, false)
But this formula is not working, the reason why I'm trying to do this is because sheet names can be edited without affecting the formula
Can someone please advise me how to use the range function inside vlookup?