Copy title in cells

Dookie

New Member
Joined
Apr 7, 2011
Messages
18
If anyone could help me please:confused:

I would like the name of my excelbook or the name of the worksheet to be copied in a specific cell into the same Excelbook , in order to avoid rewriting whenever i open a new workbook.(new file)
Thank u in advance for your support....
;)
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
you could use some code like this

Sub CheckName1()
range("B2")=activeworkbook.name
range("B3")=activesheet.name
End Sub
 
Upvote 0
Friend, could you please send me an example to understand this??????

Bookname: May 2011
Worksheet name: No1
Cell (A) code: ????
Mention that i don't want to write every time the name of the book, but to be automatically inserted in the cell...
Thank u
 
Last edited:
Upvote 0
It didn't work my friend....
I think because i use excel 2003... do you have any more ideas????
anyway, thank in advance!!!;)
 
Upvote 0
It works in all versions of Excel but the file must be saved first before you add those formulas.
 
Upvote 0
Sorry to disturb you, but i'll tell you what i'm doin', so please tell me what i did wrong:

I opened a new excelbook and wrote down:
<table border="1" cellpadding="0" cellspacing="0"><tbody><tr style="background-color: rgb(202, 202, 202); text-align: center; font-weight: bold; font-size: 8pt;"><td style="border: 3px outset rgb(240, 240, 240);">A</td></tr><tr style="height: 18px;"><td style="border-style: outset; border-color: rgb(240, 240, 240); background-color: rgb(202, 202, 202); text-align: center;">1</td><td>May.xlsm</td></tr><tr style="height: 19px;"><td style="border-style: outset; border-color: rgb(240, 240, 240); background-color: rgb(202, 202, 202); text-align: center;">2</td><td style="font-family: Arial Unicode MS; font-size: 10pt;">Data</td></tr></tbody></table> then i save and close the book.

then open my book that i want my data to be appear, and writing down in two different cells the two codes that you gave me....
None of them appear to work... it gives an alarm of syntax. I 've doubled checked the code you gave me and i've copied it exactly the same.
I changed the commas (before the A1)with ; , but still didn't work.

Thank u in advance for you support friend...
 
Upvote 0
Start a new workbook. Save it. Enter the formulas that I gave you. Save it again.
 
Upvote 0
You mean this, right?<table border="1" cellpadding="0" cellspacing="0"><tbody><tr style="background-color: rgb(202, 202, 202); text-align: center; font-weight: bold; font-size: 8pt;"><td> </td><td style="border: 3px outset rgb(240, 240, 240);">A</td></tr><tr style="height: 18px;"><td style="border-style: outset; border-color: rgb(240, 240, 240); background-color: rgb(202, 202, 202); text-align: center;">1</td><td>May.xlsm</td></tr><tr style="height: 19px;"><td style="border-style: outset; border-color: rgb(240, 240, 240); background-color: rgb(202, 202, 202); text-align: center;">2</td><td style="font-family: Arial Unicode MS; font-size: 10pt;">Data</td></tr></tbody></table>

Done it... Next?
 
Upvote 0
Next what? It looks like you simply copied what I had written in the cells. You need to enter the Formulas.
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

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