referencing sheets by number instead of name in cells
问题 Lets say sheet3.name = "d" Is there a way I could put in a cell on sheet2 the formula =sum(sheet3!b:b) where sheet3 is being substituted with the actual sheet3 name? I can only get =sum('d'!b:b) to work so far. I could use VBA for this probably but I'm curious how to do this in a cell so I don't have to run a macro each time. 回答1: If you can use a UDF User Defined Function that will return the sheet name Function SHEETNAME(number As Long) As String SHEETNAME = Sheets(number).Name End Function