Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Want Cell A1 equal to File name + Worksheet name
Hi,
i want the cell A1 equal to File name + Worksheet name.. is it possible? Lawrence |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Want Cell A1 equal to File name + Worksheet name
If you are looking for a macro try this. Launch VBE using Alt + F11. From the
left tree view double click 'This Workbook' and paste the below code. Get back to workbook. The below code will write the bookname and sheet name to cell A1 on Save.... Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Range("A1") = "[" & ThisWorkbook.Name & "]" & ThisWorkbook.ActiveSheet.Name End Sub -- If this post helps click Yes --------------- Jacob Skaria "Lawrence" wrote: Hi, i want the cell A1 equal to File name + Worksheet name.. is it possible? Lawrence |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Want Cell A1 equal to File name + Worksheet name
=CELL("filename",A1)
On 21 Maj, 08:31, Lawrence wrote: Hi, i want the cell A1 equal to File name + Worksheet name.. is it possible? Lawrence |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Want Cell A1 equal to File name + Worksheet name
Using a formula, you can try this provided the workbook is already saved.
=SUBSTITUTE(CELL("filename"),INFO("directory"),) If this post helps click Yes --------------- Jacob Skaria "Lawrence" wrote: Hi, i want the cell A1 equal to File name + Worksheet name.. is it possible? Lawrence |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Want Cell A1 equal to File name + Worksheet name
Try this formula in A1:
=CELL("filename",A1) Regards, Stefi €˛Lawrence€¯ ezt Ć*rta: Hi, i want the cell A1 equal to File name + Worksheet name.. is it possible? Lawrence |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Want Cell A1 equal to File name + Worksheet name
Thanks .. it works perfectly..
but just need to do some text function to make it nicer. "Stefi" wrote: Try this formula in A1: =CELL("filename",A1) Regards, Stefi €˛Lawrence€¯ ezt Ć*rta: Hi, i want the cell A1 equal to File name + Worksheet name.. is it possible? Lawrence |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Want Cell A1 equal to File name + Worksheet name
You are welcome! Thanks for the feedback!
Clicking the YES button will be appreciated. Post if you can tell us what form would be nicer for xou! Stefi €˛Lawrence€¯ ezt Ć*rta: Thanks .. it works perfectly.. but just need to do some text function to make it nicer. "Stefi" wrote: Try this formula in A1: =CELL("filename",A1) Regards, Stefi €˛Lawrence€¯ ezt Ć*rta: Hi, i want the cell A1 equal to File name + Worksheet name.. is it possible? Lawrence |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Want Cell A1 equal to File name + Worksheet name
This will give you File Name : =MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1) This will give you sheet name : =REPLACE(CELL("Filename",A1),1,FIND("]",CELL("filename",A1)),"") -- mubashir aziz If this post helps Don't 4get to click Yes ------------------------------------------------------------------------ mubashir aziz's Profile: http://www.thecodecage.com/forumz/member.php?userid=237 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=98725 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
File name equal cell contents | Excel Discussion (Misc queries) | |||
Cell equal to File Name | Excel Discussion (Misc queries) | |||
How do you set the worksheet name equal to file name? | Excel Discussion (Misc queries) | |||
File name equal cell contents | Excel Discussion (Misc queries) | |||
File name equal cell contents | Excel Discussion (Misc queries) |