+ Reply to Thread
Results 1 to 4 of 4

Copy range of cells from excel file on SharePoint

  1. #1
    Registered User
    Join Date
    03-15-2010
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    72

    Copy range of cells from excel file on SharePoint

    Background:
    I have a master Excel file that needs updating from various people in various locations. To facilitate the updates and to provide version control, I broke the master excel file into separate smaller files and uploaded them onto SharePoint.

    Desired Outcome:
    My end result would be to have a button/macro for each worksheet that would reach out to the corresponding file on SharePoint, Copy the relevant cell(s), and PasteSpecial(Values) into the master Excel File.

    Progress thus far:
    I am able to directly link my master file to the file on SharePoint to reflect the values:
    Please Login or Register  to view this content.
    the issue with that is my master file updates automatically upon opening and is time consuming especially when there's only one worksheet (out of many) that needs updating. Can anyone provide guidance on the VBA needed to access the broken down files, copy a specific range and (preferably) Paste Special(values) into the master file?

  2. #2
    Registered User
    Join Date
    05-28-2012
    Location
    Hinckley
    MS-Off Ver
    Excel 2003 / 2010 / 2013
    Posts
    7

    Re: Copy range of cells from excel file on SharePoint

    Hi,

    Try this:-

    Please Login or Register  to view this content.
    Then for each set you need to grab enter the following:-

    Please Login or Register  to view this content.
    That should work perfectly...
    Last edited by milenia; 06-13-2017 at 09:40 AM.

  3. #3
    Registered User
    Join Date
    03-15-2010
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Copy range of cells from excel file on SharePoint

    Thanks for the suggestion. I copied the code and modified it as necessary to test an initial copy/paste. As it stands now, it hangs up and throws an error at the line:
    Please Login or Register  to view this content.
    I've verified the SharePoint link and tested it via windows explorer and it opens that way. I've verified the worksheet names (still Sheet1, Sheet2, etc). Range now is copying cell A1 from the source file to cell A1 of the destination file. Any ideas why it might be hanging up at this point?

  4. #4
    Registered User
    Join Date
    03-15-2010
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Copy range of cells from excel file on SharePoint

    Ok, So I found a much simpler solution that appears to work thus far. Have a bit more tweaking to do to get it expanded to my full requirements, but below is a sample that works in my test environment:

    Please Login or Register  to view this content.
    Last edited by SUPPO_USN; 06-13-2017 at 01:49 PM.

+ 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. VBA to select SharePoint Content Type when saving Excel file to SharePoint
    By Luffk73 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-24-2017, 05:22 PM
  2. Saving an excel file to sharepoint
    By ctguards1987 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-04-2017, 09:39 AM
  3. Select file and copy values from SharePoint excel file
    By peetman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-17-2014, 06:26 AM
  4. Replies: 0
    Last Post: 10-08-2013, 10:54 AM
  5. Macro to get the latest file (excel file) from sharepoint sites
    By vigneshwaran in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-13-2012, 09:45 AM
  6. Outlook -->SharePoint--> Excel file, vrs Excel file --> SharePoint -->outlook
    By LiLi1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-07-2011, 09:56 PM
  7. Copy Data from Excel Files (from a Sharepoint) to Access MDB File
    By LordMarcus in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2009, 05:59 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