#1
|
|||
|
|||
Can a macro rename Excel files based on a cellname?
Can a macro rename Excel files based on a cell's contents? The problem maybe that I download these files en masse from a website and they all have 54-character long randomly generated filenames which I can rename by selecting all and then use the rename function to get a series of filenames like a, a(2), a(3), ... but I would rather have the files renamed based on the text that exists in cell B1 which is the title of the report. I also read somewhere that this kind of macro only works if the tabs have names like "Sheet 1" |
#2
|
||||
|
||||
Sure. Do you know how the SaveAs statement works in VBA? You can provide a document name in quotes, but you can also fetch the report title from B2, or wherever, and use that instead.
If you need more explanation then maybe we should back up; I don't know yet how much you know about writing macros...? |
Tags |
filename, rename, tabname |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to rename multiple Word file with same suffix | ozil61 | Word VBA | 2 | 05-06-2014 07:36 AM |
Convert old PowerPC file to Intel-based files in Word? | walmar | Word | 0 | 06-12-2013 07:07 AM |
Rename Files | gsrikanth | Excel Programming | 3 | 05-14-2012 03:03 AM |
Macro based on cell value | ubns | Excel Programming | 1 | 05-07-2012 04:03 AM |
Merging word files from excel macro | hklein | Excel Programming | 0 | 08-05-2011 02:27 AM |