ACarella
Thu Jun 26 16:39:01 CDT 2008
Hi Ron:
I was wondering if you could help me.
I have the following in Excel 2007:
w8001.xlsx
w346.xlsx
w78.xlsx
w172.xlsx
w8001.xlsx has 8 columns and 8001 rows of data
w346.xlsx has 3 columns and 346 rows of data
w78.xlsx has 3 columns and 78 rows of data
w172.xlsx has 3 columns and 172 rows of data
I need to append the three columns (A, B and C) of w346, 278 and w172 to the
END of W8001 and the data to append to the appropriate 3 columns.
How do I proceed.
"Ron de Bruin" wrote:
> You not copy all the code
>
> Download the example workbook and test it
>
> --
>
> Regards Ron de Bruin
>
http://www.rondebruin.nl/tips.htm
>
>
> "Sheldon Potolsky" <SHPsalm139@aol.com> wrote in message news:00941541-b389-44df-8081-cbb92642ce51@z72g2000hsb.googlegroups.com...
> Hi Ron. I tried your code (below) but got:
> Compile error: Sub or Function not defined (with Get_File_Names
> highlighted)
> Am I missing something?
> Thanks, Sheldon
> *****************************
> Sub RDB_Merge_Data()
> Dim myFiles As Variant
> Dim myCountOfFiles As Long
>
> myCountOfFiles = Get_File_Names( _
> MyPath:="C:\Users\Ron\test", _
> Subfolders:=False, _
> ExtStr:="*.xl*", _
> myReturnedFiles:=myFiles)
>
> If myCountOfFiles = 0 Then
> MsgBox "No files that match the ExtStr in this folder"
> Exit Sub
> End If
>
> Get_Data _
> FileNameInA:=True, _
> PasteAsValues:=True, _
> SourceShName:="", _
> SourceShIndex:=1, _
> SourceRng:="A1:G1", _
> StartCell:="", _
> myReturnedFiles:=myFiles
>
> End Sub
>
> On May 9, 10:16 am, "Ron de Bruin" <rondebr...@kabelfoon.nl> wrote:
> > See also
http://www.rondebruin.nl/copy3.htm
> >
> > --
> >
> > Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
> >
> >
> >
> > "Sheldon Potolsky" <SHPsalm...@aol.com> wrote in messagenews:eca5c476-6e00-4cdb-9d06-3006336d3a4b@d77g2000hsb.googlegroups.com...
> > > Hello. I would like to open up a new spreadsheet and append rows 2 -
> > > EOF from six other spreadsheets into that new one, be prompted for the
> > > name to save it with, then save and quit. Would someone be kind
> > > enough to offer some VBA code to do this with?
> > > Thank you,
> > > Sheldon Potolsky- Hide quoted text -
> >
> > - Hide quoted text -
>
>