View Single Post
  #2   Spotlight this post!  
Unread 03-04-2006, 14:21
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,562
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Excel macro needed

Quote:
Originally Posted by dhitchco
namely, we want to copy each row from workbook A into the respective "tab" in workbook B into a new row on that spreadsheet tab. If the row in workbook A doesn't correspond to a current tab in workbook B, then create a new tabbed sheet in the master workbook.
Since you know the teams ahead of time, you can create tabs for each team.

Or, you can avoid the tabs all together and create an interface page similar to what Karthik did here using MATCH and OFFSET.:
http://www.chiefdelphi.com/forums/sh...threadid=37101. This works well as long as all of the team's data is next to each other. We created a simple macro that sorted the data by team number whenever we saved.

Here is that macro. You'll of course need to change the ranges and column for your data.

Code:
Sub SortMD_Robot()
' SortMD_Robot Macro
' Macro recorded 3/22/2006 by Zach Steele

    Sheet17.Select
    Range("A4:T453").Select
    Selection.Sort Key1:=Range("B4"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
    Range("A4").Select
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Call SortMD_Robot
    Cancel = False
End Sub