formula to find Sheet name in different worksheet

SamS

Well-known Member
Joined
Feb 17, 2002
Messages
542
Ivan (with greatful thanks) posted this formula recently which places the worksheet name into a cell which I have used more and more of late.

=MID(CELL("filename",C10),FIND("]",CELL("filename"),1)+1,255)

I have 2 variations I need to use.
1) I want the cell to reference a different worksheet (which is a department name), have tried a number of alternatives but am having no luck.
2) I then require another cell which is a formula (for use in a graph) to pick up this same reference ie replace the Network Program Delivery in ="Network Program Delivery'!$K$1 with the worksheet reference.

I know it seems to be a heavy handed way of doing things (and there probably is some simple way of doing it) but the way department names change regularily around here I only want to make one change and that is to the worksheet name.

Will be eternally gratefull if someone can supply the info :)
Edit: too early in the morning here-also off the coffee which probably explains it. Prob no2 is not a prob any more, will just rely on the formula automatically changing with the worksheet name change
This message was edited by SamS on 2002-05-21 15:49
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi,

You would likely need a user-defined function (UDF) to do this, although I can't tell exactly what you are requesting.

<pre>
Function test()
test = Application.Caller.Worksheet.Next.Name
End Function

Function test2()
test2 = ActiveSheet.Next.Name
End Function
</pre>

These two functions should work for you, after modification. I think the top is a bit more stable. These just get the next sheet after the sheet where you place the formula.

Bye,
Jay
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,168
Members
448,870
Latest member
max_pedreira

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