Need cell formula to find sheetname of tab n-tabs before current

DeBeuz

Active Member
Joined
Jun 6, 2012
Messages
448
Hi guys,

I have a workbook which I'm not allowed to share or publicate.

Inside the there are a lot of tabs, amongst them:
'0' Start of Costcenter tab range
'13134' one of the costcenter tabs
'9' End of Costcenter tab range
'Config' a check/lookup/reference sheet.

Between the '0' and '9' there are one ore more CC-tabs.
They have a name that is the costcenter number (5 digits, starting with a '1').

Is there a cell formula that I can use on the config tab to fetch the sheetname of the first sheet after '0'?
In this example it should return '13134' since it it the name of the first sheet after '0'.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
The uploading procedure looked very complicated.

You can create a new workbook from scrath, containing 8 (empty) tabs.
Name them 'Dummy1', 'Dummy2', '0', '13134', '13135', '9', 'Dummy3' and 'Config'.
I need a formula for e.g. Config!B2 that returns "13134", being the name of the first tab after '0', or the name of the tab 2 positions before '9'.
 
Upvote 0
Welcome to the MrExcel board!
Is there a cell formula that I can use on the config tab to fetch the sheetname of the first sheet after '0'?
No, you would need vba to do that. Something like this:
Code:
Sub FirstSheetAfter0()
    Sheets("Config").Range("B2").Value = _
        Sheets(Sheets("0").Index + 1).Name
End Sub
 
Upvote 0
Thanks Peter,

But management has forbidden to put in any vba in those workbooks.
Thanks for the confirmation that it can not be done without vba though.

Kind Regards,

Paul
 
Upvote 0
Thanks Peter,

But management has forbidden to put in any vba in those workbooks.
Thanks for the confirmation that it can not be done without vba though.

Kind Regards,

Paul
I think this can be done without VBA (technically).

You'd have to use Excel 4 macro functions which are technically not VBA.
 
Upvote 0

Forum statistics

Threads
1,215,151
Messages
6,123,316
Members
449,094
Latest member
Chestertim

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