Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Column picked randomly with probability relative to number of entr Neil Goldwasser Excel Worksheet Functions 4 May 30th 06 08:55 AM
Conditional Format as a MACRO Gunjani Excel Worksheet Functions 3 March 29th 06 05:22 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Format cell in column B based on value in the next cell (column c) Nicole Excel Discussion (Misc queries) 7 May 18th 05 10:19 PM


All times are GMT +1. The time now is 08:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"