![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Posts: 541
|
How can I set a cell's value equal to the name of the sheet that it is on?
I'm aware of ActiveSheet.Name in VB, but is there a method I can use that doesn't require a macro to run? |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
A search would reveal a number of solutions One of which is; =MID(CELL("filename",A1),FIND("]",CELL("filename"),1)+1,255) |
|
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: Apr 2002
Location: Kissimmee, Florida
Posts: 384
|
Quote:
Are you opposed to User Defined Functions? If not then create the following and you can just enter the formula into spreadsheet as below =SheetName() Code:
Function SheetName()
SheetName = ActiveSheet.Name
End Function
__________________
Hope This Helps. Sean. Digest of Homes WinXP, XL XP |
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Posts: 175
|
I love the way by the time you have posted, two people have beaten you to it! This board is great
using: =cell(A1,"filename") and doing some cropping should get you there _________________ As ever, I expect there's a better way. Regards, Mike [ This Message was edited by: sann0638 on 2002-05-20 09:25 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|