Good day again, Gurus. This one will be a challenge, if it is even possible.
Thanks to Sean in another thread I am now able to open all workbooks in a particular folder that match the month entered in an input box via the user, and can copy a worksheet from that workbook to a new workbook, consolidating the data from about a hundred workbooks into a single workbook: http://www.excelforum.com/excel-prog...ser-input.html
I have now run into a new problem. I thought that each workbook opened would have a field on the worksheet containing the Vendor ID # which I would reference to name the worksheet with the Vendor ID # when copying the sheet to the new workbook. Unfortunately, the Vendor ID # is not in the data, so the only way to get the vendor name or ID # when copying worksheets to a new folder is via the filename.
My goal is to get the Vendor Name from the file name, vlookup the vendor name against a list I will create which crosses the vendor name to the Vendor ID #, and then name the worksheet with the Vendor ID #. The only advantage is that all of the filenames are in a similar format:
Monthly PV Status and Usg - Vendor Name (04-08-2014).xlsx
Other than that, the Vendor Name could be one of about 100 different vendor names, of varying number of characters. I was hoping there was a way to pull out the data between the "-" and the "(", remove the space that would be left at the beginning and end of the Vendor Name, (if we pull everything between the characters mentioned above), and then vlookup against my list to get the vendor number.
Can this even be done, or are there too many variables coming into play? I'm open to suggestions from anyone who may know a better way to do it.
Thanks in advance for any help you can offer.
Bookmarks