+ Reply to Thread
Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    03-15-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Inserting rows per new entry

    I need help regarding this situation:

    As you can see on the left side of the sheet, I have Names with a few details in them in pink and Team colors etc in blue right next to them. What should happen is that Excel should read the names in pink and match them with the blue parts, when it sees that there's a zero, that means that it should move to the next name and match it. There are also cases wherein multiple entries of the blue part occur and the name associated with it should be duplicated depending on the number of multiple entries. Basically, the pink parts should adjust to the blue part. The order is exactly like that and it should only move to the next name once it sees that "0". I had a few people work on this already and they tell me its a matter of inserting rows. But as of the moment, we are stumped.

    If this can be done without the use of macros that would be great. If not, then I'll take whatever helps. Thanks again!

    http://img.photobucket.com/albums/v2...ic/halp2-1.jpg

    Disclaimer: I'm using dummy data but more or less this is the problem of my sheet.
    Attached Files Attached Files
    Last edited by sgpao; 03-21-2010 at 11:47 PM.

  2. #2
    Forum Moderator teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    2003 & 2010
    Posts
    10,042

    Re: Inserting rows per new entry

    if you need help with picture, post pictures. If you need help with Excel files .... ???
    teylyn
    Microsoft MVP - Excel
    At Excelforum, you can say "Thank you!" by clicking the icon below the post.

    Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.

  3. #3
    Registered User
    Join Date
    03-15-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Inserting rows per new entry

    I took a screenshot of my spreadsheet to make it easy for people to see the problem.

  4. #4
    Forum Moderator teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    2003 & 2010
    Posts
    10,042

    Re: Inserting rows per new entry

    I know you took a screenshot of your spreadsheet. I can see that. You attached it.

    Anyone here worth their salt will test a solution before offering it to you. Nobody feels like re-typing your data off a screenshot in order to create a workbook that resembles your data layout.

    Now get over it and post a workbook or don't expect answers any time soon.
    teylyn
    Microsoft MVP - Excel
    At Excelforum, you can say "Thank you!" by clicking the icon below the post.

    Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.

  5. #5
    Registered User
    Join Date
    03-15-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Inserting rows per new entry

    OH! Yes, yes I'm so sorry, just really stressed out with this problem. Sorry, here is the link for the Excel file. My apologies, I did not realize that uploading a picture instead of the file itself would be more difficult for those who want to help! Sorry again! Here is the file link.

    http://www.mediafire.com/?nm3gmzo4odz

  6. #6
    Registered User
    Join Date
    03-15-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Inserting rows per new entry

    bumping for great justice

  7. #7
    Forum Moderator teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    2003 & 2010
    Posts
    10,042

    Re: Inserting rows per new entry

    sgpao, please use the forum facilities to upload files instead of an untrusted external site. This will also give the helpers an indication of the file size, before clicking the link.
    teylyn
    Microsoft MVP - Excel
    At Excelforum, you can say "Thank you!" by clicking the icon below the post.

    Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.

  8. #8
    Registered User
    Join Date
    03-15-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Inserting rows per new entry

    fixed attachments now, sorry about that.

  9. #9
    Registered User
    Join Date
    03-15-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Inserting rows per new entry

    rebumping for great justice

  10. #10
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,139

    Re: Inserting rows per new entry

    I've looked at your sample.

    Maybe I'm missing something, but what links any particular student to a team?

  11. #11
    Registered User
    Join Date
    03-15-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Inserting rows per new entry

    Quote Originally Posted by Marcol View Post
    I've looked at your sample.

    Maybe I'm missing something, but what links any particular student to a team?
    They have no relationship whatsoever

  12. #12
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,139

    Re: Inserting rows per new entry

    In that case what is the connection between the pink table and the blue table?

    There must be something to connect the two tables.

    EDIT:
    Okay maybe I have read your original post incorrectly
    I'll give it a go.
    Last edited by Marcol; 03-19-2010 at 08:14 AM. Reason: second thoughts

  13. #13
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,139

    Re: Inserting rows per new entry

    Try this to see if it is what you want (File Attached)

    Run the macro on Sheet("Sheet1 (2)")

    Code:
    Option Explicit
    
    Sub TransposeRows()
        Dim CopyRange As Range
        Dim LastRow1 As Long, LastRow2 As Long, NextSet As Long
        Dim n As Integer
        
        LastRow1 = Range("B" & Rows.Count).End(xlUp).Row
        LastRow2 = Range("O" & Rows.Count).End(xlUp).Row
    
        For n = LastRow1 To 3 Step -1
            If NextSet = 0 Then NextSet = LastRow1
            Set CopyRange = Range("B" & NextSet & ":E" & NextSet)
            Do
                CopyRange.Copy Range("K" & LastRow2)
                LastRow2 = LastRow2 - 1
            Loop Until Range("O" & LastRow2) = 0 Or LastRow2 = 2
            LastRow2 = LastRow2 - 1
            NextSet = NextSet - 1
        Next
    End Sub
    Any problems let me know

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    03-15-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Inserting rows per new entry

    Thanks, I translated the formula to my spreadsheet, and it works perfectly, thanks again.

  15. #15
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,139

    Re: Inserting rows per new entry

    Glad to have helped.

    It's so much easier given an example, showing before and after, as you did in the end.

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.2.0