Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default fill several sheets with data from other workbooks matching criter

So far, I was able to make a macro to filter data from a project log sheet in
a workbook, and copy/paste the rest of the data in each row based on criteria
in column A to the corresponding worksheets with a name matching the data in
column A on the project log. But now what I need to do is make a macro that
will do basically the same thing, but will instead run on sheet(1) of any
other workbooks with a filename that contains "RetailProjectLog" in a certain
folder location on a network share. Is this possible? If so, how can I do it?

I wish I could attach my sample workbook so you could see an example of what
I'm talking about. If there is some way to attach an example workbook please
let me know and I will do so. Here is the macro I am using now though.

Sub Test()
Dim Cell As Range, x As Integer, LastRow As Long
Application.ScreenUpdating = False

For x = 2 To Worksheets.Count
Sheets(x).Range("A12").Value = Sheets(x).Range("A12")
For Each Cell In Sheets(1).Range("A3:A250")

' Find Last Row num for each sheet
With Sheets(x).Range("A:A")
LastRow = .Cells(.Count, 1).End(xlUp).Row + 1
End With

If Cell.Value = Sheets(x).Name Then
Cell.Offset(0, 1).Resize(, 16).Copy
Sheets(x).Range("A" & LastRow).PasteSpecial (xlPasteValues)
Cell.Offset(0, 17).Copy
Sheets(x).Range("A" & LastRow).Offset(0, 24).PasteSpecial
(xlPasteValues)
End If
Next Cell
Next x
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub


Thank you for any help you can offer!
Mike
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
fill several sheets with data from other workbooks matching criter leveleyed Excel Programming 0 March 25th 10 02:14 AM
Compare worksheets to copy and paste data based on matching criter Monomeeth Excel Programming 1 November 4th 08 04:50 AM
Matching data on two workbooks Mifty Excel Discussion (Misc queries) 3 December 6th 07 03:35 PM
Split data from 1 workbook into multiple workbooks based on criter bUncE Excel Worksheet Functions 0 October 29th 07 03:26 PM
Copying rows from 2 sheets to a new worksheet based on date criter Phill_Morgan Excel Discussion (Misc queries) 9 August 29th 07 08:03 AM


All times are GMT +1. The time now is 05:01 PM.

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"