+ Reply to Thread
Results 1 to 4 of 4

Inserting Rows Based On 8 Rows Per Mile in a Data Set

  1. #1
    Registered User
    Join Date
    12-04-2007
    Posts
    30

    Inserting Rows Based On 8 Rows Per Mile in a Data Set

    Hello community

    I was hoping someone could help me with a very difficult problem which I just cannot over come.

    I am given a report, which contains data in column A B C.

    The data in these columns represent distance along the highway.

    Column A represents the Start of the Road in Miles.

    Column B represents the Start of a section of road in Yards.

    Column C represents the End of a section of road in Yards.

    So 29 0 220 would the road section 29Miles 0Yards to 220Yards

    The data should be presented such that each mile in the report should be composed of exactly 8 rows in whole yards, where each row represents 220yards of road for example:-

    Aa.JPG

    The problem is that the data is never presented in such a way, often it is presented in the following way:-

    Bb.JPG

    As you can see 30 mile only has 1 row which is just 22 yards and 31 mile Help.xls4 rows associated with it.

    I need to format the data such that if there are less then 8 rows representing a mile then the start row of the mile is copied until there are 8 rows for that mile for example:-

    Cc.JPG

    As you can see the green cells are the inserted rows to make up 8 rows per mile.

    Is there anyone out there who can help me I have been struggling with this for so long that I am going crazy.

    I cannot seem to upload my raw my email is unomo@hotmail.com I can email it to you.

    Thanks

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Inserting Rows Based On 8 Rows Per Mile in a Data Set

    Hi Mark-
    1) What are your columns?
    2) What is your first row of data?
    3) What is your last row of data?
    4) Are there any blank rows within the data?
    5) Are there any missing mile numbers, or is it a complete sequence?

  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Inserting Rows Based On 8 Rows Per Mile in a Data Set

    Try

    Please Login or Register  to view this content.
    Kind regards
    Leo

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Inserting Rows Based On 8 Rows Per Mile in a Data Set

    Try this:-
    Your actual data assumed to start "A2".
    Result start "E1".
    Please Login or Register  to view this content.
    Regards Mick

+ 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: 0
    Last Post: 05-20-2014, 11:58 AM
  2. Inserting rows based on entered value
    By terrra in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-04-2013, 10:59 PM
  3. Inserting rows based on criteria
    By REPLB in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2013, 11:40 AM
  4. [SOLVED] Inserting number of rows based on a count of data
    By Ranelagh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2012, 10:30 AM
  5. Inserting rows based on cell value
    By iwontbelost in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2009, 07:45 AM
  6. Inserting Page Breaks on relative Rows based on Data
    By Tirren in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-29-2008, 07:38 PM
  7. Inserting multiple rows in excel with data in consecutive rows
    By technotronic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-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