+ Reply to Thread
Results 1 to 2 of 2

VB for importing data into excel in proper columns

  1. #1
    Bob Reynolds
    Guest

    VB for importing data into excel in proper columns

    This is a repost from worksheet.functions. I was told to copy and paste but
    appropriate columns but it's not possible so I'm looking for an answer here
    in programming. I have data on the company's server that can be exported in
    comma deliminated format and when I import and open, the header row is
    complete. My question is how do I, when importing, get the various headers
    to import into an existing header I have, with different names.How do I get
    the imported data into the headers I want each time that I import these
    files.
    I'm trying to do this without intervention so that everyone (20 employees in
    the bureau) can simply download the information and have it
    automatically be placed where it needs to. My problem is I don't know that
    much about VB or Macro's to do this.
    So if someone can help with vb programming or a macro to look at the
    imported information, with 20 rows of data and import into my
    existing worksheet that already has information in it.
    Something like:
    A1 = LName
    A2 = FName
    A3 = ERName
    A4 = ERaddr1
    A5 = ERaddr2
    A6 = City etc. all of these would be column headers with 20 rows of info
    below....
    INTO
    A1 = CLastName
    A2 = CFirstName
    A3 = EmployersName
    A4 = EmployerAddress
    A5 = EmployerExtension
    A6 = City..... etc....

    I need to import this and not disturb existing data, but add onto the
    list....
    Thanks
    BOB Reynolds



  2. #2
    Rocky McKinley
    Guest

    Re: VB for importing data into excel in proper columns

    Hi Bob,

    I would import the data into a template worksheet with the same headings
    each time. Then move the values over to the proper worksheet using copy and
    paste.

    Since we don't have your data base it is difficult for us to tell you how to
    do this.
    Try recording your actions in a marcro when importing and copying and
    pasting. This will write the code for you then you can post the code again
    asking more specific questions.

    To record a macro in the Tools Menu > Macro > Record New Macro ... name the
    macro then press "Ok".
    All your actions will be written in Vba in the visual basic editor. To
    enter the visual basic editor press "Alt F11" then look under the folder
    named Modules, your code should be in "Module1".
    Hope this gets you started.

    --
    Regards,
    Rocky McKinley


    "Bob Reynolds" <[email protected]> wrote in message
    news:wYv8e.73811$f%[email protected]...
    > This is a repost from worksheet.functions. I was told to copy and paste
    > but appropriate columns but it's not possible so I'm looking for an answer
    > here in programming. I have data on the company's server that can be
    > exported in comma deliminated format and when I import and open, the
    > header row is complete. My question is how do I, when importing, get the
    > various headers to import into an existing header I have, with different
    > names.How do I get the imported data into the headers I want each time
    > that I import these files.
    > I'm trying to do this without intervention so that everyone (20 employees
    > in the bureau) can simply download the information and have it
    > automatically be placed where it needs to. My problem is I don't know that
    > much about VB or Macro's to do this.
    > So if someone can help with vb programming or a macro to look at the
    > imported information, with 20 rows of data and import into my
    > existing worksheet that already has information in it.
    > Something like:
    > A1 = LName
    > A2 = FName
    > A3 = ERName
    > A4 = ERaddr1
    > A5 = ERaddr2
    > A6 = City etc. all of these would be column headers with 20 rows of
    > info
    > below....
    > INTO
    > A1 = CLastName
    > A2 = CFirstName
    > A3 = EmployersName
    > A4 = EmployerAddress
    > A5 = EmployerExtension
    > A6 = City..... etc....
    >
    > I need to import this and not disturb existing data, but add onto the
    > list....
    > Thanks
    > BOB Reynolds
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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