+ Reply to Thread
Results 1 to 2 of 2

VBA to generate # rows based on cell value and insert information

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    Philadelphia, PA, USA
    MS-Off Ver
    Excel 2007
    Posts
    16

    VBA to generate # rows based on cell value and insert information

    Hi and thank your for any help/guidance provided!

    My workbook is attached. My goal is to drop in the report on the Acrotime Report tab and have it autogenerate my data. I have my data setup, I am just stuck on the VBA portion.

    The tab Master List has the # of rows in column E. These rows should be entered on the Import File tab. The first employee was completed manually as an example.

    Each row corresponds to a location ID and number of hours per earning code. This information is found on the tab Acrotime Report.

    Regular hours are submitted to the location noted in Column F on the Acrotime Report tab (column E on the Import File tab). Columns H, I and J are totaled for each employee and spread between their locations worked based on the locations hours ratio. So if location 1040 has 50% of an employees hours, it will receive 50% of their PTO hours as well.

    All of this information then makes up the Import File sheet, one row per employee, per earning code, per location.

    I imagine I want to loop through the list on Master List, I just don't know how to transfer the data via VBA from Acrotime Report to the Import File in the propert format.
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: VBA to generate # rows based on cell value and insert information

    Two questions:

    You are trying to fill out the import file?

    Also, I can see there you get the 26, 24 and 22 REG hours for employee 105. Where does the 2.89, 2.67 and 2.44 "P" hours come from. Please confirm that these are prorated for the 72 regular hours worked.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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] Insert rows based on the current cell value and, then, copy some cells into the new rows
    By Excel-RZ in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-03-2013, 05:19 PM
  2. [SOLVED] Sort entire rows with information based on a cell value
    By anghicole in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-11-2013, 04:25 PM
  3. [SOLVED] insert rows based on number in cell and copy the data down into the new rows
    By pziefle in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-05-2013, 11:19 AM
  4. Insert rows based on a value in a cell and copy the data down into the new rows
    By eyeman96 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2013, 07:54 AM
  5. Insert a Row Based on Information in a Cell
    By ebrown5034 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2012, 09:20 PM
  6. [SOLVED] Insert Multiple Rows Based Off Number in Cell and Copy Data From Above New Rows
    By tstell1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2012, 04:15 PM
  7. Delete Rows based on cell value and then Insert rows alternatively with a formula
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-11-2008, 04:27 PM
  8. generate multiple rows based on cell value
    By Theresa in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-25-2005, 06:21 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