LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Copying data from many files

Hello,

Using Excel XP.

I have a number of files in one directory (say C:\Temp).
Each file has two sheets - "Infor" and "Sales". The
layout and format of "Sales" is the same in all files.
Example for 2 files follows.

Cell C1 of the "Info" sheet in each workbook contains the
customers name (= the name of each workbook respectively)

(b) = blank cell

ABC.xls - Sales worksheet (A1: C downwards)
ItemCode ItemDesc Type1$ Type2$
101 Item114 $101 (b)
102 Item102 $50 (b)
203 Item203 (b) $75
204 Item204 (b) $35


XYZ.xls - Sales worksheet (A1: C downwards)

ItemCode ItemDesc Type1$ Type2$
114 Item114 $23 (b)
102 Item102 $50 (b)
103 Item103 $56 (b)
203 Item203 (b) $75
204 Item204 (b) $35
205 Item205 (b) $45

From each file, I need to copy the data from each "Sales"
worksheet to Sheet1 in "Summary_Sales.xls", in the
following format:

CustName ItemCode ItemDesc Type1$ Type2$
ABC 101 Item114 $101 (b)
ABC 102 Item102 $50 (b)
ABC 203 Item203 (b) $75
ABC 204 Item204 (b) $35
XYZ 114 Item114 $23 (b)
XYZ 102 Item102 $50 (b)
XYZ 103 Item103 $56 (b)
XYZ 203 Item203 (b) $75
XYZ 204 Item204 (b) $35
XYZ 205 Item205 (b) $45

I am familiar with FileSearch to open/close each file in
a directory, but I'm failing on the looping syntax to
populate "Summary_Sales.xls". I have unsuccessfully tried
to adapt the syntax from a macro authored Mr. T. Ogilvy
found at http://makeashorterlink.com/?A14813CA8.

I will appreciate any assistance on this matter.

TIA

Richard


 
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
Copying from different files into 1 LiAD Excel Discussion (Misc queries) 1 November 4th 09 01:57 PM
Need Help Copying Excel Files to a CD jm47 Excel Discussion (Misc queries) 6 November 26th 08 05:44 AM
Copying Files RH206 Excel Discussion (Misc queries) 2 April 1st 08 08:21 PM
Copying files fds Excel Worksheet Functions 1 July 27th 05 12:55 AM
Copying data across 2 xcel files Gandei Excel Programming 1 December 5th 03 04:58 PM


All times are GMT +1. The time now is 02:45 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"