+ Reply to Thread
Results 1 to 10 of 10

Pulling rows from a master list into separate pages

Hybrid View

Maddyp Pulling rows from a master... 02-11-2013, 07:04 PM
arlu1201 Re: Pulling rows from a... 02-12-2013, 08:00 AM
Maddyp Re: Pulling rows from a... 02-12-2013, 04:14 PM
visha_1984 Re: Pulling rows from a... 02-12-2013, 08:16 AM
arlu1201 Re: Pulling rows from a... 02-13-2013, 04:53 AM
Maddyp Re: Pulling rows from a... 02-13-2013, 03:45 PM
Maddyp Re: Pulling rows from a... 02-13-2013, 01:53 PM
arlu1201 Re: Pulling rows from a... 02-14-2013, 08:44 AM
Maddyp Re: Pulling rows from a... 03-04-2013, 01:25 PM
arlu1201 Re: Pulling rows from a... 03-04-2013, 02:00 PM
  1. #1
    Registered User
    Join Date
    02-11-2013
    Location
    Kingston, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    5

    Angry Pulling rows from a master list into separate pages

    Alright, this is my first post ever, because I have been working on this for ages and getting nowhere- please help.

    I don't have a lot of experience with macros and VBA so go easy on me, but I feel like this *should* be easy.

    Note: I am only uploading a small sample of the entire excel page this will be implemented in, so that I could focus on just this one problem.

    Basically, I have one big "equipment" page in which (in the final version) I will have dropdown menus that select the sub-process that the type of equipment applies in. I have tabs for all of the different sub-processes. I basically want the user to input all the data on all the equipment on the main "equipment" page, and then from the selections of the drop-down menus send all that data to each separate sub-process sheet.
    I can get it to work so that if there are 54 rows in the main equipment page, and 4 of those are "boilers," I can get 54 rows in the boilers worksheet with 4 boiler data points and blanks for the rest of everything else- but I just want there to be 4 rows in the boiler page.

    I've attached the experiment sheet. Sorry about the conditional formatting colours and some of the names might be weird from what I've already tried, but PLEASE, any help would be GREAT.
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Pulling rows from a master list into separate pages

    A few questions -

    1. Would you prefer that as you select a value in the dropdown, the row should immediately be copied / moved? Or do you want to select the dropdowns for each row and then click on a button to transfer the rows? If you do the 1st option, the data will transfer immediately, so if you select the wrong option, the data will be wrongly transferred. The 2nd option is more safe in these terms.

    2. Do you want the rows to be moved or should they be copied?

    3. If the rows are going to be copied to the other sheets, once you load the data today and run the macro, if you load fresh data tomorrow, would the fresh data be loaded in the next available row or would you clear the data in the master sheet and then load the data?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    02-11-2013
    Location
    Kingston, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Pulling rows from a master list into separate pages

    Hey arlu,

    1. A button would probably be better, you're right, because that would definitely be a good safety.
    2. I would like the rows to be copied.
    3. I want the data in each of the sub-process pages to be the same as the data in the main equipment page. So if something from the main equipment page gets deleted, the corresponding data in the sub-process page gets deleted as well.

    Thanks!

  4. #4
    Forum Contributor visha_1984's Avatar
    Join Date
    11-27-2012
    Location
    Pune,India
    MS-Off Ver
    Excel 2013
    Posts
    309

    Re: Pulling rows from a master list into separate pages

    Hi,
    Maddyp


    pls check attahment
    hope this will help u
    Attached Files Attached Files
    Happy to Help

    VISHA

    Click *, if the suggestion helps you!
    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>> "Mark your thread as Solved"

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Pulling rows from a master list into separate pages

    Did you try the solution in post 3?

  6. #6
    Registered User
    Join Date
    02-11-2013
    Location
    Kingston, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Pulling rows from a master list into separate pages

    Yes, I'm not sure what it does

  7. #7
    Registered User
    Join Date
    02-11-2013
    Location
    Kingston, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Pulling rows from a master list into separate pages

    Visha-

    I'm not really sure what yours is doing other than changing the top row colour in each of the sub-process pages.
    If I change anything in the main equipment boiler to "boilers" it does not show up in the boilers page.

    I am also not sure why there are other sub-processes in each of the sub-process pages. Ideally, I need boilers to look totally red, lighting to be all blue, etc.

    Thanks for trying though.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Pulling rows from a master list into separate pages

    Try this code - Each time any changes are done to the main page, you need to run the macro -

    Option Explicit
    
    Sub update_sheets()
    Dim i As Long, lrow As Long
    Dim sname As String
    
    Application.ScreenUpdating = False
    
    For i = 1 To Worksheets.Count
        With Worksheets(i)
            If .Name <> "Equipment" Then
                lrow = .Range("A" & .Rows.Count).End(xlUp).Row
                If lrow > 1 Then .Range("A2:M" & lrow).ClearContents
            End If
        End With
    Next i
    
    With Worksheets("Equipment")
        lrow = .Range("L" & .Rows.Count).End(xlUp).Row
        For i = 2 To lrow
            sname = .Range("L" & i).Value
            If Not Evaluate("ISREF('" & sname & "'!A1)") Then
                Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = sname
                .Rows("1:1").Copy Worksheets(sname).Range("A1")
            End If
            .Range("A" & i & ":M" & i).Copy Worksheets(sname).Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
        Next i
    End With
    
    Application.ScreenUpdating = True
    
    End Sub
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button

  9. #9
    Registered User
    Join Date
    02-11-2013
    Location
    Kingston, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Pulling rows from a master list into separate pages

    Oh my goodness thank you so much!!!

    I'm ecstatic.

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Pulling rows from a master list into separate pages

    Am glad it worked for you.

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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