• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Change Cell base on Sheet Name

Hi,

Do you have anyway to change one cell base on the sheet name?
Please view attached file for more detail question.

Thanks for your help.
C
 

Attachments

  • Change name in the cell following sheet name.xlsx
    9.6 KB · Views: 3
Hi,

With VBA it is reasonably easy...
Please refer to attachment.

There may be a way to do it without VBA though, but this solution is the first that comes to mind... hope it helps!
 

Attachments

  • Change name in the cell following sheet name.xlsm
    15.7 KB · Views: 5
Without VBA:

In each "Mr..." sheet, place the following formula in a cell (let's say A1):
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

This will reflect the sheet name... just refer to this cell from sheet4 :)

EDIT: or even better, use in sheet4:
=MID(CELL("filename",'Mr. A'!A1),FIND("]",CELL("filename",A1))+1,255)

'Mr. A'!A1 - select a random cell from the desired sheet.
 

Attachments

  • Change name in the cell following sheet name.xlsx
    10.4 KB · Views: 5
Last edited:
Thanks alot. It works now
Without VBA:

In each "Mr..." sheet, place the following formula in a cell (let's say A1):
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

This will reflect the sheet name... just refer to this cell from sheet4 :)

EDIT: or even better, use in sheet4:
=MID(CELL("filename",'Mr. A'!A1),FIND("]",CELL("filename",A1))+1,255)

'Mr. A'!A1 - select a random cell from the desired sheet.
 
Back
Top