Consulting

Results 1 to 5 of 5

Thread: Importing Data

  1. #1

    Importing Data

    Hi,

    I am faced with a dilemma when importing data into Excel 2007.

    A simplified version of my problem:

    I am importing a table from a database (also Excel 2007) that has data in column A. The data imports into column A of the new workbook, which works fine.

    The problem occurs in column B of the new workbook. Columns B in the new workbook requests a manual entry, which the user enters based on the data that is imported into columns A of the same row. The new workbook is saved and closed. Now if the database is adjusted by deleting an existing data cell in column A, the new workbook refreshes column A but column B does not adjust to the change. Is it possible to have Column B inputs adjust accordingly to the change in imported data?

    Basically, what happens is that when one cell of data is deleted from the database, the import range shifts up causing a [FONT='Calibri','sans-serif']misalignment between column A and B. Any clever way to address this? [/FONT]

    Thank you in advance for your help!

  2. #2
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location
    does column a adjust with a workbook change event?
    ------------------------------------------------
    Happy Coding my friends

  3. #3
    I am not sure what your question is, but Column A in the new workbook changes when the database workbook is altered. I am not sure how to have column B in the new workbook change also. Column B in the new workbook doesn't feed from the database and needs to adjust to the new data in column A. Is this possible?

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Quote Originally Posted by Learner123
    Basically, what happens is that when one cell of data is deleted from the database, the import range shifts up causing a misalignment between column A and B. Any clever way to address this?
    Yes, don't use delete. Clear Content of cell instead.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #5
    You make an intresting point Aussiebear - but leads to a problem in the longer run. If user clears data from the database and then opens the new workbook, everything remains aligned. However, if the user sorts the new workbook and then refreshes the import, everything is thrown off. Preventing the user from sorting may be an option, but is there another work around to this dilemma?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •