+ Reply to Thread
Results 1 to 9 of 9

Importing from another worksheet problems.

Hybrid View

  1. #1
    Registered User
    Join Date
    09-28-2016
    Location
    Mallon, Yorkshire
    MS-Off Ver
    2013
    Posts
    5

    Importing from another worksheet problems.

    Hi. Hello everyone. I'm looking forward to being active in this forum.

    In the meantime I have a data import problem.

    A database is generating an excel workbook (called "postings.xls"). I have no control over the DB method of export. The data is simply dumped in a sheet with no headers. The exported data is always in the same format & column locations but the column lengths can be any number of rows. I am only interested in the information in column H from the postings sheet. My problem is when I import the whole postings.xls sheet into a table in my new worksheet (RevenueChecker.xlsx). The new table for some inexplicable reason changes the position of the columns. For example the original column H import can end up in column I one day and then column P the next, I've had the information I want appear in virtually any column from B to I.

    All I want to do is create a new imported sheet, within my RevenueChecker workbook, which is an exact copy of the exported postings.xls sheet. I've checked all the DB exported postings.xls sheets and the info I need is always in column H. Yet as mentioned, once imported into my RevenueChecker it can appear in any column. I have tried creating links direct to the postings.xls workbook, column H, but again the problem is that the update is hit and miss and I end up with #ref errors. So to summarise, I need to create a foolproof link to the info in postings.xls, column H, which is available to my RevenueChecker.xlsx workbook.

    The workbook (as mentioned), is automatically generated by a proprietary DB each night. The RevenueChecker workbook is then opened by my colleague who is IT illiterate. The RevenueChecker (which I have created) is returning spurious data because #ref errors are produced when the location of the column H data cannot be found consistently.

    Any help on this problem would be greatly appreciated.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,897

    Re: Importing from another worksheet problems.

    1. Do you need to import the entire worksheet or would it work to only import Column H?

    2. How are you importing? Manually? or a Macro?

    3. Can you post a sanitized copy of both sheets for analysis and examination?
    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
    09-28-2016
    Location
    Mallon, Yorkshire
    MS-Off Ver
    2013
    Posts
    5

    Re: Importing from another worksheet problems.

    1. Just the data in H is needed.
    2. Manually (Via the DATA Connections facility).
    3. Sanitised copies attached. (The checktender_detail_0.xls referred to in the worksheet, I have no issues with.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-28-2016
    Location
    Mallon, Yorkshire
    MS-Off Ver
    2013
    Posts
    5

    Re: Importing from another worksheet problems.

    Aha. I've discovered the problem. When opening RevenueChecker.xlsx, if postings.xls is already open then the original column H imports into the table as column H. If when opening RevenueChecker.xlsx when postings.xls is not open, then postings.xls is imported to the table in RevenueChecker.xlxs as column I. It gets worse. If the other worksheet I import as a table (Check_Tender_Detail_0.xls) is open then it's table is fine but, postings.xls now imports the original column H into column B. Can anyone explain why this would be?

    Untitled.jpg


    Untitled1.jpg
    Last edited by excel-medic; 09-29-2016 at 12:48 AM.

  5. #5
    Registered User
    Join Date
    09-26-2011
    Location
    The ozone
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Importing from another worksheet problems.

    A down and dirty solution would be to use iferrror. Something along the lines of:

    Formula: copy to clipboard
    =IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(A1+B1,A1+C1),A1+D1),A1+E1),A1+F1),A1+G1),A1+H1),A1+I1)

    In my sheet (see image) I added the value in A1 to each of the other columns until I did not get an error.excel-medic-import-issue.png

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: Importing from another worksheet problems.

    Quote Originally Posted by sixeyeco View Post
    A down and dirty solution would be to use iferrror. Something along the lines of:

    Formula: copy to clipboard
    =IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(A1+B1,A1+C1),A1+D1),A1+E1),A1+F1),A1+G1),A1+H1),A1+I1)

    In my sheet (see image) I added the value in A1 to each of the other columns until I did not get an error.Attachment 482542
    How on earth does that relate to anything the OP said?

    Also, please update your profile as necessary to properly reflect the exact version(s) of Excel your question relates to. Members tailor answers based on your Excel version. Your profile says 2003, but your suggestion indicates at least 2007
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Registered User
    Join Date
    09-28-2016
    Location
    Mallon, Yorkshire
    MS-Off Ver
    2013
    Posts
    5

    Re: Importing from another worksheet problems.

    I've just discovered something:

    On first opening the RevenueChecker.xlsx the postings.xls imported as a table within the RevenueChecker. On the first time of opening it, a few hours ago. The postings.xls Column H appeared in the new generated table (Sheet1) in column I. On opening RevenueChecker.xlsx a second time just now, postings.xls, Column H magically had moved within the table to column H. Truly odd that. On the third opening of RevenueChecker.xlxs, magically Column H of the imported postings.xls now appeared in the table within RevenueChecker.xlsx as column I again! It's exactly the same postings.xls file which is being imported, so why on earth does it change columns within the RevenueChecker.xlxs imported table?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: Importing from another worksheet problems.

    Does not answer your question, but have you tried just keeping 2 separate files, and then just referencing col H in the destination file?

  9. #9
    Registered User
    Join Date
    09-28-2016
    Location
    Mallon, Yorkshire
    MS-Off Ver
    2013
    Posts
    5

    Re: Importing from another worksheet problems.

    Yes, I tried that. getting the imported data to update automatically was very hit & miss.

+ 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. Problems Importing Excel to Outlook
    By Goodegg in forum Excel General
    Replies: 1
    Last Post: 02-12-2010, 03:08 PM
  2. Problems with importing XML files
    By chephy in forum Excel General
    Replies: 3
    Last Post: 01-17-2010, 01:28 PM
  3. Importing Data From Web Problems with XML
    By allencook in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-13-2009, 02:44 PM
  4. Column Problems When Importing
    By Wrkoutguy08 in forum Excel General
    Replies: 1
    Last Post: 03-11-2008, 07:16 PM
  5. importing data problems
    By jaimetimbrell in forum Excel General
    Replies: 4
    Last Post: 06-17-2007, 09:34 AM
  6. Problems with Importing a File
    By Mystrunner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2006, 08:50 PM
  7. Problems importing a CSV-file
    By ApPojken in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-16-2006, 07:20 AM
  8. Problems Importing from Access
    By davey in forum Excel General
    Replies: 1
    Last Post: 07-08-2005, 12:47 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