+ Reply to Thread
Results 1 to 4 of 4

Taking specific values from one Excel file and copying them into another in a list

  1. #1
    Registered User
    Join Date
    03-27-2019
    Location
    Deeside
    MS-Off Ver
    Windows 10
    Posts
    6

    Question Taking specific values from one Excel file and copying them into another in a list

    I need to create an excel spreadsheet that reads specific information from the attached spreadsheet.

    In the attached sheet, I have a series of days of the month and then each day is populated with information. In the example attached, dates are in row 13 and then the column changes depending on the day - for example E3, then K3 etc. Vehicle registrations are in column F, L etc. but are spaced out. In the real version, these dates continue across the screen.

    What I need to do extract the reg numbers for the current day into a single list on a new Excel file, and then on the following day replace these reg numbers with the new day's ones. I'm doing this so I can easily read the information into my BI platform. I can't make any changes to the original document because it's being used and updated regularly. I don't know how to take this information because of the format of the spreadsheet. Plus it's complicated because the columns it reads from will be changing every day.

    I've tried to provide as much guidance as I can in the Excel files to indicate what it is I am after. Please read the little comments I've left on the attachments for more help. Please let me know if anything doesn't make sense.

    I'd really appreciate help with this! Thanks.
    Attached Files Attached Files
    Last edited by DBFG; 04-18-2019 at 06:16 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Taking specific values from one Excel file and copying them into another in a list

    With both files open, and with a date in A2 of the Book1 file, you can use this formula in B2:

    =IFERROR(INDEX('[Traffic Sheet - April 2019 edit.xlsx]Sheet1'!$D$6:$P$140,(ROWS($1:1)-1)*5+1,MATCH($A$2,'[Traffic Sheet - April 2019 edit.xlsx]Sheet1'!$D$3:$P$3,0)+2)&"","")

    Copy this down as far as you need to. I've only set the range to suit the (two) days that you show in your file, but for your real file you will need to adjust the $P shown in red above.

    If the Traffic Sheet file is not open, you will need to show the full path to the file before the sheet name.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-27-2019
    Location
    Deeside
    MS-Off Ver
    Windows 10
    Posts
    6

    Re: Taking specific values from one Excel file and copying them into another in a list

    Hi Pete,

    Thanks! This seems to work great!

    I just have a question? So my full file path is something like \\farp01\Traffic$\2019\04 Traffic Sheet 2019 - April 2019.xlsx - what would the formula look like for me to insert this correctly? I will definitely need to add in the file path because it won't always be open.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Taking specific values from one Excel file and copying them into another in a list

    You need to include the full path inside the opening apostrophe and before the [ at the start of the filename - this occurs twice in the formula.

    The easiest thing to do is once you have set up the formula that I gave you with both files open, then just close the Traffic file - Excel will adjust the formula for you and include the full path.

    Hope this helps.

    Pete

+ 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. Replies: 19
    Last Post: 08-18-2021, 11:23 PM
  2. [SOLVED] Opening a text file copying a specific set of info for a list off numbers
    By brendanlowrywork in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 07-05-2017, 08:56 AM
  3. [SOLVED] Copying only specific file names from a directory based on Excel Sheet
    By pynergee in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-20-2016, 12:21 PM
  4. Copying specific cells from different closed workbooks to a Master Excel file
    By kennad in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-11-2015, 09:34 AM
  5. Macro for copying specific values from one excel file to another
    By TrueTears in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-02-2013, 10:31 AM
  6. Macro for copying specific data from excel files in a folder to a newly created excel file
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2012, 02:24 PM
  7. Replies: 2
    Last Post: 03-30-2011, 08:05 PM

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