View Single Post
 
Old 08-20-2014, 11:19 PM
ryanjohnsond@gmail.com ryanjohnsond@gmail.com is offline Windows 8 Office 2007
Novice
 
Join Date: Aug 2014
Posts: 18
ryanjohnsond@gmail.com is on a distinguished road
Default

Quote:
Originally Posted by excelledsoftware View Post
There is a way to run code with all workbooks. I can modify the code I sent you to do this however it is important that when running code on multiple workbooks that they each have similar attributes.

Do all of the workbooks have multiple sheets that need this ran or just the first sheet?
Are all of the workbooks a certain type of name so the code can skip over workbooks that dont meet that criteria?
Are all of the workbooks in one folder? I can research how to get Excel to open and process each file from a folder but the first 2 questions would need to be answered before we do that.

I can write something that will run in all OPEN workbooks pretty easily but you will probably not want to open up 50+ workbooks on your computer.

Thanks
That's fantastic!

>> I can modify the code I sent you to do this however it is important that when running code on multiple workbooks that they each have similar attributes. >>

They all have similar attributes, except the columns start on the 2nd row, and the two columns are the 2nd and 3rd columns.

One other caveat. The column names in the column headers have a carriage return in them (in the header itself), like "Part [carriage return] Number". So, right now, I have to manually rename the headers so that the code finds them. Is there a way to remove the carriage off the header name, rename it without a comma (the name is all on one line) and then do the rest of the removing carriage returns and replacing it with commas?

So the header looks like this:

Part
Number

and needs to look like this (VB script needs to remove the carriage, bring the word "Number" up on the same line as "Part":

Part Number

and then the rest of your code runs...

>>Do all of the workbooks have multiple sheets that need this ran or just the first sheet?>>
Not sure what you mean by "multiple sheets". I am bringing PDFs into Excel and then running the script so a DB can use certain columns for data on a web page. When you say "sheet", do you you mean multiple tabs at the bottom of an Excel file?

>> Are all of the workbooks a certain type of name so the code can skip over workbooks that dont meet that criteria? >>
They're named by part number and part name (numbers first, then name second in one file name string... like this: 42A 500 005 H 006 H Rear axle.pdf, 42A 500 007 H 008 H Wheel carrier assembly for rear axle.pdf, 42A 500 009 F Stabilizer rear axle.pdf, 42A 513 005 F 006 F Shock absorber, rear axle.pdf, etc

>> Are all of the workbooks in one folder? I can research how to get Excel to open and process each file from a folder but the first 2 questions would need to be answered before we do that. >>

There are two separate folders, but I can cut 'n' paste into different folders to reduce the number of files open at a time.

Thank you very much, excelledsoftware.
Reply With Quote