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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 01:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com