+ Reply to Thread
Results 1 to 8 of 8

Extract the value of about 30 different cell references out of 420 closed workbooks

  1. #1
    Registered User
    Join Date
    09-04-2017
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    4

    Lightbulb Extract the value of about 30 different cell references out of 420 closed workbooks

    Hi All, any ideas very much appreciated on this one...

    I have 420 excel workbooks which all contain employee and roster details set out roughly as per below. Each piece of information is in exactly the same cell in all files.

    (row) (4 columns)

    1
    2
    3
    4 Emp Name: Joe Blow Qualification: Bachelor
    5 Emp ID: 1000 Pay rate: $30
    6 Position: Example position
    7 Effective from date: 1/02/2017
    8
    9
    10 Session time Start time End time
    11 Monday 10:00 13:00
    12 Tuesday 9:00 11:00
    13 Wednesday
    14 Thursday 14:00 18:00
    15 Friday 9:00 15:00
    16
    17 Roster Start time End time
    18 Monday 9:00 14:00
    19 Tuesday 8:00 11:00
    20 Wednesday
    21 Thursday 13:00 18:00
    22 Friday 7:00 16:00


    I am wanting to extract all of this information and create a new table with these column headings, and one record for each person.

    Emp ID: Emp Name: Position Effective from date: Qualification: Pay rate: Monday Start Time Tuesday Start Time Wednesday Start Time Thursday Start Time Friday Start Time Monday End Time Tuesday End Time Wednesday End Time Thursday End Time Friday End Time

    Many thanks for your help in advance!

    Tulips and Roses.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Extract the value of about 30 different cell references out of 420 closed workbooks

    Look at attached file and tell me if it's setup correctly. (This is something you should do, BYW.)
    Attached Files Attached Files
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    09-04-2017
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Extract the value of about 30 different cell references out of 420 closed workbooks

    Thank you David. Yes, that's pretty much what I'm after. I have attached a file with exactly what I'm trying to do. The first sheet contains an example of the data file. I'm trying to extract the values in each of the cells highlighted by green, then put them in separate columns. The second sheet contains an example of my desired format. The order of the columns doesn't matter.

    Thanks so much for your help in advance!

    Christine
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,998

    Re: Extract the value of about 30 different cell references out of 420 closed workbooks

    How are the sheets named - employee name, employee number or what?

    I did have to read the employee name a couple of times to make sure that I didn't see what I thought that I'd seen....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,998

    Re: Extract the value of about 30 different cell references out of 420 closed workbooks

    Edit: need to start over. Ignore this post.
    Last edited by Glenn Kennedy; 09-07-2017 at 03:05 AM.

  6. #6
    Registered User
    Join Date
    09-04-2017
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Extract the value of about 30 different cell references out of 420 closed workbooks

    Hi Glenn. Not sure that I completely understand what you mean? I did a little typo with the name. In Australia "Joe Blow" is commonly known as a fictional name. Is it something rude in Ireland? My apologies! I didn't mean to offend anybody!

    Christine.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,998

    Re: Extract the value of about 30 different cell references out of 420 closed workbooks

    Never mind... isn't the term Blow J** pretty much universal??

    Seriously, though; I'm still looking at this. I am assuming that you want to pick up a person's name from a cell, look up that sheet and then return cell values. There are VERY limited options. As you're probably aware, INDIRECT, which would be just the job doesn't work on closed sheets. There are a few udfs out there, but have a tendency to be horribly slow. You have just so many data points that you want to return, this is likely to be a major problem. I've just frozen my PC looking at one of the options. Off to try another, before reporting back....

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,998

    Re: Extract the value of about 30 different cell references out of 420 closed workbooks

    Best shot... but not optimistic. Requires .xlsm to work.

    1. Unzip staff folder and put it, say, on desktop. DL destination, also, say to desktop.

    2. Create a named range called fl CTRL-F3
    =FILES("C:\Users\Dglenn\Desktop\Staff\*")&T(NOW())

    Replace the details with YOUR full path.

    3. With your master sheet in a DIFFERENT folder, this in B4, copied down:
    =IFERROR(LEFT(INDEX(fl,ROW()-2),LEN(INDEX(fl,ROW()-2))-5),"")

    This will generate a list of all of the files in the desktop folder called "Staff".

    4. Code, pasted into a module:
    Please Login or Register  to view this content.
    How to install your new code
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
    [B][I]


    Then in yellow shaded cells (I've only done a few) variants on this formula, which was copied from A3:

    =IF($B3="","",IndirectEx("'C:\Users\Dglenn\Desktop\Staff\["&$B3&".xlsx]Sheet1'!B5"))

    Again, you'll need to change the path to suit your PC. And change the B5 to reflect the cell content that you're trying to retrieve.

    Now go away and have a cup of tea.... or a 3 course meal while it works through ....Try it with just a couple of fields first...
    Attached Files Attached Files

+ 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. How to extract data from multiple closed workbooks?
    By russwongg in forum Excel General
    Replies: 2
    Last Post: 10-19-2016, 01:08 AM
  2. Extract data from closed workbooks
    By cralph78 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-15-2015, 10:34 AM
  3. VBA to extract sheet in multiple closed workbooks to a sing sheet on new workbook (HELP!)
    By The1theycallp in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-12-2014, 08:19 AM
  4. Vba to extract data from multiple closed workbooks
    By The1theycallp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2013, 07:49 AM
  5. Extract data from closed workbooks and copy into new workbook
    By philaugust2004 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-15-2013, 07:45 AM
  6. Extract data from several closed workbooks via VBA matching cells
    By ahjualune in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-21-2012, 01:30 AM
  7. Replies: 3
    Last Post: 03-20-2011, 03:22 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