I want to add cell value to existing name of excel worksheet
Like Old Excel file name + Cell value
I want to do this for all the worksheets in a folder.
Need updation in Bulk
Please help
I want to add cell value to existing name of excel worksheet
Like Old Excel file name + Cell value
I want to do this for all the worksheets in a folder.
Need updation in Bulk
Please help
A couple of Questions
1. Is the Cell Value located on the Same Sheet in every file? Provide Sheet Name
2. Is the Cell Value located in the same Cell in each sheet? Provide Cell Address
3. Are all files .xlsx files
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
See if this code works for you:
Please Login or Register to view this content.
Last edited by alansidman; 04-21-2020 at 11:41 AM. Reason: Error noted by OP has been highlighted
It is giving path/File Access error. Runtime error 75. on following line
```Name oName As nName```
https://www.techwalla.com/articles/h...ntime-error-75
I don't know how to fix it. I have asked others in this forum to look at it and offer up a fix.
Last edited by alansidman; 04-21-2020 at 11:39 AM.
What is the value of nName at the point where the error occurs? Is it a well-formed path/file name? If so, does a file with this name already exist?
The way I set it up, and because the OP wanted to append a value to the new name, I needed to drop the .xlsx from the file name to create a new file name with no extension, ie. Myfile2.
nName is therefore the original path & Myfile2 & the appended value from the worksheet & the extension .xlsx
This nName did not previously exist.
I hope this helps you to understand my thinking as I wrote this. Appreciate any thoughts on getting this to work.
Hi there,
See if the following code does what you need:
The highlighted values may be altered to suit your requirements.Please Login or Register to view this content.
Hope this helps - please let me know how you get on.
Regards,
Greg M
@alanisdman: I think the main problem was that your code was trying to rename the workbook while it was still open.
Many thanks for the Reputation increase - much appreciated!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks