+ Reply to Thread
Results 1 to 3 of 3

How to automatically add repeating data to the next row in same column without retyping

Hybrid View

  1. #1
    Registered User
    Join Date
    01-19-2015
    Location
    Flint, Michigan
    MS-Off Ver
    MS Office 2007
    Posts
    2

    How to automatically add repeating data to the next row in same column without retyping

    I need help writing VBA code for data input userform.

    I have a worksheet with 8 columns. The first 4 columns (A:D) are used to input business names and healthplan data:
    BusinessName, HealthPlan, GroupNumber, ZipCode

    The next 4 columns (E:H) are used for individual employee data:
    EmpName, EmpIID, Relationship, Age.

    For each business name there may be one or many different employees. Whenever there is a new employee in the same business, I want the data in the first 4 columns to repeat into each new row without retyping the same data, and to continue to repeat until another new business name is entered.

    I've created a userform that works great to add the data but I can't figure out how to write the code to let me add duplicate information without retyping. Any suggestions will be greatly appreciated. Thanks!

  2. #2
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: How to automatically add repeating data to the next row in same column without retypin

    Try this:
    Re: Automatically add repeating data

    Select your range, and format as General
    Highlight all the cells that need attention. lets say, A2:D1000. This includes all existing cells containing values.
    Now, press F5.
    Select Special
    Select Blanks
    Press OK
    Press the press the = key
    press and hold down the CTRL key
    press the arrow up key (still holding down the CTRL key. . .don't let go. . .)
    press enter.
    copy and paste the entire range as values.
    You can record this method into VBA and use call to invoke it during the procedure.


    Pete

  3. #3
    Registered User
    Join Date
    01-19-2015
    Location
    Flint, Michigan
    MS-Off Ver
    MS Office 2007
    Posts
    2

    Re: How to automatically add repeating data to the next row in same column without retypin

    Thank you. That works if I go back and manually manipulate the worksheet. What I'm hoping for is code to have the repeating cells automatically be copied and pasted into the next empty row when triggered by a command button on the User form. I don't want to be entering blank spaces in any of the rows of new data.

+ 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: 2
    Last Post: 07-25-2012, 06:12 AM
  2. Repeating data in 1 column to multiple columns
    By tjones in forum Excel General
    Replies: 2
    Last Post: 12-07-2007, 07:50 PM
  3. lookup with repeating data in column a
    By kiki_lallissee in forum Excel General
    Replies: 5
    Last Post: 02-26-2007, 04:48 PM
  4. Is it possible to modify large amounts of data without retyping?
    By smiddlewood in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-26-2007, 02:49 PM
  5. [SOLVED] How can I remove all hyphens in a column without retyping?
    By Laurie in forum Excel General
    Replies: 2
    Last Post: 07-06-2005, 11:05 AM

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