+ Reply to Thread
Results 1 to 7 of 7

Macro to copy cell values from another excel workbook

  1. #1
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Macro to copy cell values from another excel workbook

    Hi,

    Need your expertise.

    I have an excel sheet where in i need to paste the values from another different excel file every time.

    A macro which would ask to select an excel file, to copy the cells (B2, B7,C3) of the selected file and then paste the values in current worksheet, would be helpful.

    Thank you.
    Have a Nice Day!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,897

    Re: Macro to copy cell values from another excel workbook

    Where would you like the copied cells to go in your current worksheet. Will they overwrite the existing cell values or not. More specific information is needed to provide you with a solution. Are the cells being copied, formulas that will require paste special or are they text or values that can simply be pasted. Help us to help you by giving us specific information about your project.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Re: Macro to copy cell values from another excel workbook

    The copied cells be pasted in A1, A2, A3 of current worksheet and will overwrite the existing values if any. Cells being copied are to be pasted as values.

    Thank you!

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,897

    Re: Macro to copy cell values from another excel workbook

    Try this code: Put it in the target workbook as a module.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Re: Macro to copy cell values from another excel workbook

    THANK YOU VERY MUCH ALAN.

    Have a great weekend!

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,897

    Re: Macro to copy cell values from another excel workbook

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Re: Macro to copy cell values from another excel workbook

    Hi,

    The excel files which i open also contain a checkbox. Based on which i am trying to insert some text in current worksheet.
    So, i have added the following lines to the above code.

    Please Login or Register  to view this content.
    But it is resulting in a error "The item with specified name was not found"

    Can you please help on how to fix this.

    Thanks.

+ 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. Macro formula for copy cell value from files excel to one workbook
    By aathasril in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2014, 10:23 PM
  2. Excel - macro to loop through row data and copy cell to each worksheet in the workbook
    By swilson2006 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-21-2013, 07:54 AM
  3. Macro to copy specific cell data into a different excel workbook
    By Khanzaki in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-08-2013, 05:55 AM
  4. Replies: 9
    Last Post: 06-24-2013, 04:14 PM
  5. Copy cell values from open workbook to closed workbook
    By merrener in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2012, 03:14 AM

Tags for this Thread

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