+ Reply to Thread
Results 1 to 4 of 4

read single cell content from sheet of closed file and put it in a cell on an active sheet

  1. #1
    Registered User
    Join Date
    02-06-2014
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    4

    read single cell content from sheet of closed file and put it in a cell on an active sheet

    Hello everyone. I am very new to VBA programming. programming mostly in C++ even this problem is hard.
    so starting with what you'll probably find as simple. crawl before walk. I have main spread sheet that is open.
    and I also have a few xls files that are closed, but the sheets are laid out identical. I would like to know how
    to take cell C17 from one of the closed files, read the data from it, then put it in cell A3 on the open sheet.
    once I get a grasp on this, the other cells should be a snap. thank you in advance.

    I can open the files but can not seem to get just a single cell from it. other examples I see on line, which do
    help, seem to copy whole sheets. not just a single cell. and the syntax is quite different than what I'm used
    to.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,737

    Re: read single cell content from sheet of closed file and put it in a cell on an active s

    you need to enter the path, filename , sheet, range

    depending on if the workbook is in the same directory , then the path is not required

    in a1 put
    = 'C:\Directory-folder\[FileName.xlsx]SheetName'!C17

    some functions do not work with closed workbooks

    if in same directory/folder

    ='[FileName.xlsx]SheetName'!C17

    the ' are used if you have spaces in any of the names
    Last edited by etaf; 02-08-2014 at 03:22 PM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    02-06-2014
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: read single cell content from sheet of closed file and put it in a cell on an active s

    thanks to your reply... your resolution worked perfect...

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,737

    Re: read single cell content from sheet of closed file and put it in a cell on an active s

    your welcome
    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved.

+ 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. [SOLVED] If cell X's content in Sheet A equals to cell Y's content in Sheet B, Then copy some data.
    By sunheroj in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-09-2012, 09:25 AM
  2. Return to active sheet-cell content copy
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-09-2008, 11:26 AM
  3. based on Cell/Column content ,cut one sheet's values and paste it in other sheet?
    By mindpeace in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-25-2006, 08:33 AM
  4. Copy from active sheet and paste into new sheet using info from cell in active
    By Ingve in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2006, 06:00 PM
  5. Replies: 3
    Last Post: 11-18-2005, 05:00 PM

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