Hi,
I want a certain cell to get the name of the Excel file, and is it possible for it to get only part of the name of the file?
possible?
Hi,
I want a certain cell to get the name of the Excel file, and is it possible for it to get only part of the name of the file?
possible?
Last edited by oriazria; 12-15-2020 at 08:03 AM.
=CELL("filename",A1) will give you the full filename and sheet name.
Then you can use LEFT/RIGHT/MID/LEN to extract the bits you want.
It depends on what part of the filename you want to select! What do you think i am...a mind reader?
in this![]()
Please Login or Register to view this content.
my file name is - ori azaria -test
i want the cell c3 will "ori azria"
thanks!
someone know maybe?
Hi,
I think you want something like this. This will give you .xlsx at the end if its a xlsx file so if you want to remove that change the -1 to -6 as you would be removing 5 extra characters.
![]()
Please Login or Register to view this content.
thank you friend but i didnt know why is dosent work to me:/
can you write for me include my code?
thank you.![]()
Please Login or Register to view this content.
anyone know?:/
all this forum and anyone know how to do this?
Oh...there would be PLENTY of people that know how to do this. The question you need to ask yourself is "Why has no-one responded?"
![]()
Please Login or Register to view this content.
Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.
Something like this.
The only problem is how to tell the code how many characters to remove? It is now set to 5 but will this always be the same?![]()
Please Login or Register to view this content.
this is my code and it dosent work
![]()
Please Login or Register to view this content.
I succeeded!
thanks![]()
You're welcome.
Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks