Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50199

Parsing workbooks based on parameters

$
0
0
I'll explain the whole situation and maybe there is a better way than what I'm doing: We have a folder with 37 workbooks in it, each is identical (except the data of course) with a name "XX - Line List.xls" where XX changes. I want to check column M and AM for certain parameters and then if they match put the exact same information in to "Area YY.xls" where YY is 01 through 08. Here's the formula I currently have in A9 (start of data) in "Area 06.xls"

=IF(OR(IF(LEFT(RIGHT('K:\12313\Line Designation Table\NL1 Line List\[BD - LINE LIST.xls]LINE LIST TEMPLATE'!$M$9,9),2)="06","TRUE","FALSE"),ISNUMBER(IFERROR(FIND("6",'K:\12313\Line Designation Table\NL1 Line List\[BD - LINE LIST.xls]LINE LIST TEMPLATE'!$AM$9),""))),"INCLUDE","")

Then I have the other columns as follows:

=IF($A9="INCLUDE",'K:\12313\Line Designation Table\NL1 Line List\[BD - LINE LIST NARROWS LAKE.xls]LINE LIST TEMPLATE'!$A$9,"")

I did this for 500 cells down for each "XX - Line List.xls" The problem is that now I need to make it go to 1000 and up to 3000 for some other ones because they may have more than 500 entries in the individual files. I was going to find and replace to change the absolute reference for M9 and AM9 for the first formula and then just copy -> insert copied cells at 508, 1008, 1508, etc.

Is there an easier way to do this? Is there some script that I can write that does this whole process automatically that doesn't take too long when you open it? I want this to be idiot proof.

Thanks in advanced.

Viewing all articles
Browse latest Browse all 50199

Trending Articles