+ Reply to Thread
Results 1 to 8 of 8

Importing different cells data from one excel to another excel

  1. #1
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Arrow Importing different cells data from one excel to another excel

    I have two excel workbooks with names WWR and RR. WWR is an excel which I will download from my database and RR is the one which I have formatted as per my requirement.
    Now I want some thing like: Once I download WWR from online and once I open the RR sheet which I have prepared, it should automatically update the data from sheet 1 to RAW DATA in RR file.
    The problem for me is the cell numbers are different from both the sheets. But the headdings are the same and it will remain constant when I donwnload the data from online in WWR excel file.
    And I dont want any duplications to be happen. I mean once i open the RR file first it should delete all the old data and copy the new data from WWR sheet so that to avoid the duplication of data. I hope I have clearely mentioned what I want.

    just for information I am uploading the sample RR and WWR files for reference. Please help me.

    Thank you very much.
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Importing different cells data from one excel to another excel

    Use this code -
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Re: Importing different cells data from one excel to another excel

    It is giving an error. I am sorry...it is not working.....

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Importing different cells data from one excel to another excel

    What error are you getting? When you click on debug, which is the line that is highlighted in yellow?

    Is your WWR file open while running the macro? This code should be copied into the RR file.

  5. #5
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Re: Importing different cells data from one excel to another excel

    Runtime error 9.
    Subscript out of range
    This is what the error is and when i press debug,, it is showing a line in yellow color and WWR file is not opening when i run the macro.
    I have copied the macro in RR file only. Thank you for your reply.
    If not please sace the macro in the attached files and re attach them.

    Thanks in advance...

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Importing different cells data from one excel to another excel

    Do you need the WWR file to be opened by the macro? I thought it was already open and the data would be transferred by the macro.

  7. #7
    Forum Contributor
    Join Date
    01-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    402

    Re: Importing different cells data from one excel to another excel

    I am not opening and I dont want to open the WWR file. I want to make it as automate and I need the Headdings also like S.No, EMP ID etc... in RR file.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Importing different cells data from one excel to another excel

    Try this code instead of the earlier one
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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