![]() |
move toi next column based on outside factors
I am going to try and explain this the best I can...
The code opens up like so: Sub getdata() Dim ClassServiceReport As Workbook With Application.FileSearch .NewSearch .LookIn = ThisWorkbook.Path .SearchSubFolders = False .Filename = "class*.htm" .MatchTextExactly = True .FileType = msoFileTypeExcelWorkbooks If .Execute() 0 Then For i = 1 To .FoundFiles.Count Workbooks.Open Filename:=.FoundFiles(i) Set wkbk = ActiveWorkbook I then have it to search for specific information in the "Class*" sheet and place in column F of the Class Not Serviced Report. I name each "Class*" wkbk; c1, c2 c3 etc.. Windows("Class Not Serviced Report").Activate Dim LastRow As Long With Worksheets("Summary") LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row With .Range("F56:F" & LastRow) .Formula = "=IF(ISERROR(INDEX('Class Breakdown By Store.htm'!B:B,MATCH(C56,c*.htm'!$A:$A,0))),"""",I NDEX(c*.htm'!B:B,MATCH(C56,c*.htm'!$A:$A,0)))" .Value = .Value End With End With This all runs without an issue...Now to what I REALLY would like. I can have 1-20 of the "c*" wkbks at any given time. What would be nice is this; Once Excel has found wkbk c1 and given me that data in column F, then move to wkbk c2 and give me that data in column G, then to the next until all wkbks are accounted for and data given. Can someone help me out/point me in the right direction on how to proceed? Thanks Alots! Hans |
All times are GMT +1. The time now is 02:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com