+ Reply to Thread
Results 1 to 7 of 7

Automate Filling Out Excel Form

Hybrid View

  1. #1
    Registered User
    Join Date
    09-17-2013
    Location
    VanDownbyRiver
    MS-Off Ver
    Excel 2010
    Posts
    5

    Automate Filling Out Excel Form

    Hello,

    I'm new to VBA programming and to this forum. I've been tasked with a few projects for work that require VBA and excel so I suspect I'll be spending more time here

    I would like to automate filling out a form within a multi-sheet workbook. I have no control over the formatting of the form. I have the information that will go into the form contained in a database though.

    I have compiled a table (saved in a separate excel worksheet called DATA) with the following headers to assist in doing this:
    TABNAME - Names of worksheets
    FIELDNAME - Names of the fields within the report, e.g., First Name, Last Name, Date of Birth, etc.
    POSITION - Relative position of cell containing the Value corresponding to the field. For the form I'm filling out, the value is always located to the right or below the cell containing FIELDNAME.
    VALUE - The actual values. These are all known in advance.

    I would like to do the following for each row of the above table:
    Find the cell location within TABNAME that contains the string FIELDNAME, then input VALUE into the adjacent cell determined by POSITION.

    Any guidance on where to start would be appreciated!

  2. #2
    Registered User
    Join Date
    07-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Automate Filling Out Excel Form

    you mean like a userform? U need to make a userform? Or is it already made and you need to tailor it?

  3. #3
    Registered User
    Join Date
    09-17-2013
    Location
    VanDownbyRiver
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Automate Filling Out Excel Form

    Hi aditi7,

    The form is already made, and I have to work with it as is. It has been provided to me by a vendor for me to submit information. I'd like to automate inputting the data, as I need to fill these forms out frequently. The table, described above, to assist in the process is automatically generated from an access database I have created. So I have solved half the battle.

    I have experience creating access reports, but the form is too complex for me to reproduce as an access report with the information filled out. Besides, I would not want to have to change the report every time the vendor decides to change the form.

    So I have the data, the field names they are associated with, and the relative position of the cell containing the values with respect to the cell containing the field name (as described in the original post). I just need to figure out how to locate the position of the field name (rather than hard coding this into the macro, since the position may change with a revised form), then input the corresponding value in the adjacent cell.

    Thanks!
    Last edited by Operater; 09-17-2013 at 08:21 AM.

  4. #4
    Registered User
    Join Date
    09-17-2013
    Location
    VanDownbyRiver
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Automate Filling Out Excel Form

    Here is a (basic) example form to help clarify:

    Example Form.png

    I need to find the locations (col, row) of the field names, which can exist on different worksheets within the workbook.
    I know in advance where to input the information, e.g., the first name is inputted 1 cell to the right of FIRST NAME, and a past job is inputted 1 cells below EMPLOYMENT HISTORY. A second job would be inputted 2 cells below EMPLOYMENT HISTORY, etc.

  5. #5
    Registered User
    Join Date
    07-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Automate Filling Out Excel Form

    you want a data entry userform which you can use to input into the specific rows and columns?

    Since the columns and rows do not change at each entry , it will be easier.
    I will send you a sample let me know if that's what you looking for.

  6. #6
    Registered User
    Join Date
    09-17-2013
    Location
    VanDownbyRiver
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Automate Filling Out Excel Form

    My understanding is that with the data entry userform, I still have to manually enter the data... My goal is to automate the input as well.

    I'll take a look at your sample userform to see if it does the trick, or at least helps me on the way. Can you attach it to a post? Thanks!

  7. #7
    Registered User
    Join Date
    09-17-2013
    Location
    VanDownbyRiver
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Automate Filling Out Excel Form

    Partial Solution

    I made this much more difficult than it had to be:

    If I append my list of values that need to be inputted throughout the workbook to the final worksheet, say worksheet 8, looking like below:
    Value1
    Value2
    ....
    ValueN

    Then I can go through the workbook and enter =sheet8!$A$1 (or 2,3,...,N) in the appropriate places. The only manual part of the process, is exporting the list from the database (which is easy) and then appending a worksheet at the end of the workbook where I paste the list. I can then save the workbook with a different name, keeping the original as a template to reuse.

    This alone would provide significant improvement on efficiency. However, if there is a method to automate the manual portion I'm all ears.

    I'll go ahead an mark this post as complete in a couple of days.

    Thanks!

+ 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. [SOLVED] Automate column filling after lookup
    By gigi79 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-09-2012, 03:19 PM
  2. form filling web page with excel macros.
    By Gringotts Bank in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-03-2012, 04:26 AM
  3. Filling form fields via worksheet dropdowns, user update via form, change form color
    By Demosthenes&Locke in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2010, 08:58 AM
  4. [SOLVED] use VB code IF to automate filling in 11 columns
    By smart.daisy in forum Excel General
    Replies: 1
    Last Post: 05-29-2006, 04:15 PM
  5. How can I automate filling in a Web form with Excel data?
    By VBwannaB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-03-2006, 09:25 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