+ Reply to Thread
Results 1 to 12 of 12

Import Excel sheet to another

  1. #1
    Forum Contributor
    Join Date
    10-09-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    119

    Import Excel sheet to another

    Hello All,

    I want to create a script or button to import an excel file I export from a mainframe and have it import into my nice formatted Excel sheet. So I want the Open Po Master.xlsx to be able to import the openpoexport.xls. I have both of them in the same folder next to each other. The openpoexport.xls comes from an old system that I can't connect directly to using Excel connect to external data. Hence the excel to excel.

    Any help would be most appreciated.

    Jill
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Import Excel sheet to another

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Import Excel sheet to another

    Not clear if you want to append or replace but this code will append the data from 'openpoexport.xls' to the existing data on the sheet 'OPEN PO' in 'Open PO Master.xls'.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    10-09-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Import Excel sheet to another

    Hello Norie,
    I would like to replace all the data each time.

    Thank you. Much appreciated

  5. #5
    Forum Contributor
    Join Date
    10-09-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Import Excel sheet to another

    Hello, I get out of range error.

    What am I doing wrong?

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Import Excel sheet to another

    Hey Jill,

    Did you try post #2 code - what happened? With both books open it worked nicely

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Import Excel sheet to another

    Which code is giving you the error and where in that code is the error occurring?

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Import Excel sheet to another

    To replace:

    Please Login or Register  to view this content.

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Import Excel sheet to another

    Here's my code adapted to replace the existing data with the new data.
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    10-09-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Import Excel sheet to another

    Hello, I'm getting this error. See attachment.
    Thank you in advance.

    Jill
    Attached Images Attached Images

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Import Excel sheet to another

    Jill

    Does this work?
    Please Login or Register  to view this content.

  12. #12
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Import Excel sheet to another

    Have I just been ignored

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Import data from excel files with specific file name into another excel sheet
    By Nicolina in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2017, 11:42 AM
  2. Excel automatic sheet - Import
    By ATAU in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-30-2017, 08:42 AM
  3. [SOLVED] Import named sheet from multiple excel files into a single sheet in defined excel file
    By LovesEurope in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-16-2016, 10:45 AM
  4. Help with VBA Excel - import fifth excel sheet in a workbook to access table
    By ewong in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2012, 01:20 PM
  5. Import another excel Paste data in Current open excel sheet
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-28-2012, 09:47 AM
  6. Replies: 3
    Last Post: 07-17-2007, 09:52 AM
  7. Import more than one sheet into excel
    By Chuck in forum Excel General
    Replies: 2
    Last Post: 01-27-2006, 11:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1