Return Sheetname for different Worksheet

scarlett3

Board Regular
Joined
Jan 21, 2005
Messages
73
Office Version
  1. 365
Platform
  1. Windows
I know that the following function returns the Sheetname for the current Worksheet:

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

But I'd like to return the Sheetname for the Worksheet that is one tab to the right. Is this possible?

I add new Worksheets with each new day with data relating to that particular day. I also have a 'Master' Worksheet and I'd like to be able to refer to the latest Worksheet, i.e. one tab to the right, within a formula without having to manually enter the name of that Worksheet.

Thanks
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
If you are okay with VBA, the below two UDFs can acheive what you're looking for

Code:
Function NextSheetName() As String

Application.Volatile
NextSheetName = Sheets(ActiveSheet.Index + 1).Name

End Function

Function LastSheetName() As String

Application.Volatile
LastSheetName = Sheets(ActiveWorkbook.Sheets.Count).Name

End Function
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top