Variable Tab References by location

rmc5446

New Member
Joined
Jun 26, 2012
Messages
2
Does anyone know the way to reference the farthest right tab in a workbook?

The formula would be on a summary tab, location of summary is the far left in the workbook, and essentially be a =vlookup(ref,"furthest right tab"&A:B,2,0)

Thank you for your help

Rob
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Welcome to the board.

To my knowledge there is no built in function to refer to sheets by their index# or left/right position.

You would need to use a VBA user defined function.

Try this
Right click your sheet's tab, select View Code
Click Insert - Module
Paste the following

Code:
Public Function RightSheet() As String
Application.Volatile
RightSheet = "'" & Sheets(Sheets.Count).Name & "'"
End Function

Now you can use this with Indirect
=vlookup(ref,INDIRECT(RightSheet()&"!A:B"),2,0)


Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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