Collating multiple .csv files into a single work book

M

Mr_Wilf

I’m trying to collate three differently formatted .csv files into one
workbook. But in order to get the latest data in my master document I still
have to open the three source files which sort of spoils the point of the
master doc. I don’t know if this is because:
1. I have set the book up wrongly
b. I have stored the source files in the wrong place
iii. am forced to leave the source files as .csv
100. A.N. other reason.

Any suggestions on how to resolve this?
 
M

Mr_Wilf

To clarify slightly, I need the three .csv files to appear as seperate
worksheets within the master doc, rather than combining all three into one
big sheet
 
P

Pete_UK

You can record a macro while you go through the procedure once, i.e.
open each file in turn and format the sheet how you want it to appear,
then move the sheet into the Master file. Then you can repeat the
macro whenever you need to. If your file names vary (eg date-stamped)
then you will need to edit the macro to enable you to select the
appropriate file.

Hope this helps.

Pete
 
M

Mr_Wilf

Cheers Pete, worked well!

Pete_UK said:
You can record a macro while you go through the procedure once, i.e.
open each file in turn and format the sheet how you want it to appear,
then move the sheet into the Master file. Then you can repeat the
macro whenever you need to. If your file names vary (eg date-stamped)
then you will need to edit the macro to enable you to select the
appropriate file.

Hope this helps.

Pete



.
 
M

Mr_Wilf

Hi Ron,

A good guide but think it will be overkill for what I need so done the
simple route this time.

Thanks for the reply though!
 
M

Mr_Wilf

Ron,

Tried using this for another task and after I've selected four files I end
up with the original workbook, two empty workbooks with one sheet each and a
final book with one of th efiles in it correctly.

I've just copied the macro for the multiple .csv files into a workbook
module and changed one bit - default lookup folder.

Any suggestions where I've mucked up?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top