+ Reply to Thread
Results 1 to 10 of 10

how to make a particular cell assume the name of the worksheet

Hybrid View

  1. #1
    Registered User
    Join Date
    11-04-2014
    Location
    nigeria
    MS-Off Ver
    2013
    Posts
    5

    how to make a particular cell assume the name of the worksheet

    Hello everyone,

    I'm quite new to excel. I wish to know which command or formular to apply on a cell to make it assume the name of the worksheet. For instance, if the name of my worksheet is 'Joa', and I want cell A1 to take the value 'Joa', what do I do?

    I also wonder if there's a way I can fill a particular cell (say A1) of all the sheets I have with a certain value. For instance, If I want all cell A1 to carry the value 100, and all B1 to carry date, how do I go about it? I'm working with over 30 sheets, and its a pain inserting the date in all sheets one after the other. A single command to execute this task would be really helpful.

    Thank you for your assistance.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,189

    Re: how to make a particular cell assume the name of the worksheet

    you could build a macro function
    usage: =SheetName()

    Function SheetName()
    SheetName = ActiveSheet.Name
    End Function

  3. #3
    Registered User
    Join Date
    11-04-2014
    Location
    nigeria
    MS-Off Ver
    2013
    Posts
    5

    Re: how to make a particular cell assume the name of the worksheet

    Hello Ranman,

    Thank you for your swift response.

    I think you've proffered a rather advanced solution. As a neophyte in excel, creating a macro function could be a bit daunting. Nonetheless, I don't mind learning how to do that.

    I'd do a little research here. I'd welcome a link to a thread that has a clear-cut explanation of how to create macro function.

  4. #4
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: how to make a particular cell assume the name of the worksheet

    =cell("filename) in the sheet will give you the full address of the sheet, incl the sheet tab.

    then you just need to extract the sheet tab as required

    try this
    =MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,LEN(CELL("filename",$A$1))-FIND("]",CELL("filename",$A$1)))

  5. #5
    Registered User
    Join Date
    11-04-2014
    Location
    nigeria
    MS-Off Ver
    2013
    Posts
    5

    Re: how to make a particular cell assume the name of the worksheet

    Quote Originally Posted by AlanY View Post
    =cell("filename) in the sheet will give you the full address of the sheet, incl the sheet tab.

    then you just need to extract the sheet tab as required

    try this
    =MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,LEN(CELL("filename",$A$1))-FIND("]",CELL("filename",$A$1)))
    =MID(CELL("filename",$A$1),FIND("]",CELL
    ("filename",$A$1))+1,LEN(CELL("filename",$A
    $1))-FIND("]",CELL("filename",$A$1)))

    This formular worked.

    Btw, how did you come up with that lengthy formula

  6. #6
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: how to make a particular cell assume the name of the worksheet

    Quote Originally Posted by kelsnjoku View Post
    =MID(CELL("filename",$A$1),FIND("]",CELL
    ("filename",$A$1))+1,LEN(CELL("filename",$A
    $1))-FIND("]",CELL("filename",$A$1)))

    This formular worked.

    Btw, how did you come up with that lengthy formula
    the one that I'd prepared earlier

  7. #7
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: how to make a particular cell assume the name of the worksheet

    Quote Originally Posted by kelsnjoku View Post
    Hello everyone,

    I'm quite new to excel. I wish to know which command or formular to apply on a cell to make it assume the name of the worksheet. For instance, if the name of my worksheet is 'Joa', and I want cell A1 to take the value 'Joa', what do I do?

    I also wonder if there's a way I can fill a particular cell (say A1) of all the sheets I have with a certain value. For instance, If I want all cell A1 to carry the value 100, and all B1 to carry date, how do I go about it? I'm working with over 30 sheets, and its a pain inserting the date in all sheets one after the other. A single command to execute this task would be really helpful.

    Thank you for your assistance.
    as for the second part of your question.

    easiest way is to select all the sheets as group, ie. pick the first one and Shift-pick the last one then you can work all of them together

  8. #8
    Registered User
    Join Date
    11-04-2014
    Location
    nigeria
    MS-Off Ver
    2013
    Posts
    5

    Re: how to make a particular cell assume the name of the worksheet

    Quote Originally Posted by AlanY View Post
    as for the second part of your question.

    easiest way is to select all the sheets as group, ie. pick the first one and Shift-pick the last one then you can work all of them together

    Thank you.

    I was able to group the sheet, but couldn't edit a particular cell in all the sheets.

    I prolly didn't get you...or you didn't explain well.

  9. #9
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: how to make a particular cell assume the name of the worksheet

    Quote Originally Posted by kelsnjoku View Post
    Thank you.

    I was able to group the sheet, but couldn't edit a particular cell in all the sheets.

    I prolly didn't get you...or you didn't explain well.
    yes, you got me there.
    not quite sure your question, see attached.
    isn't that what you wanted?

    Book1.xlsx

  10. #10
    Registered User
    Join Date
    11-04-2014
    Location
    nigeria
    MS-Off Ver
    2013
    Posts
    5

    Re: how to make a particular cell assume the name of the worksheet

    Quote Originally Posted by AlanY View Post
    yes, you got me there.
    not quite sure your question, see attached.
    isn't that what you wanted?

    Attachment 356452
    solved! :D

    thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 08-28-2014, 09:09 AM
  2. [SOLVED] How do I make values in a cell in one worksheet move to another worksheet
    By icevinson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2013, 06:46 PM
  3. How do I make a cell assume a certain variable as a different value?
    By puretppc in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-12-2013, 10:44 PM
  4. [SOLVED] Can I assume everyone has Scripting Run Time (scrrun.dll) on C:\WI
    By Tetsuya Oguma in forum Excel General
    Replies: 1
    Last Post: 03-10-2006, 04:40 AM
  5. Can I assume the program has crashed?
    By Catt in forum Excel General
    Replies: 2
    Last Post: 07-02-2005, 01:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1