G
Geoff ML
OK I have 1 range that is constantly changing with different goalies info.
This range has 3 columns, the first is the goalie number, the second is the
goalie position (always the letter G) and the third is the goalie name. I
have a second range that is a database of all goalies that have ever appeared
in the first list. It is also 3 columns. Essentially if in the first range
(FormattedGoalies) there is a new goalie that has never been seen before i
want it to add to the bottom of the second range called TeamPageGoalies.
There are always 2 goalies in FormattedGoalies, but these goalies change.
Goalie positions is simply set as the second column in GoaliesFormatted.
Thats how i find the next empty row in TeamPageGoalies by counting the number
of letters "G" in TeamPageGoalies then moving 2 down.
For Each Item In FormattedGoalies 'go's through each goalie in formatted
If Not TeamPageGoalies.Find(Item) Is Nothing Then 'adds the goalie to
teampage if he's not found
GoaliesRegistered = fxn.CountA(GoaliePositions) 'counts number of goalies on
teampage
For x = 0 To 2 'moves down the teampagegoalies range to add a new goalie,
then moves accross to add different info
TeamPageGoalies.Offset(0, x).Cells(2 + GoaliesRegistered) = Item.Offset(0, x)
Next x
End If
Next Item
Why won't this work? When i run it it often adds goalies to TeamPagePlayers
that are already on the list so i get multiple entries for the same person.
other times i Dont.
This range has 3 columns, the first is the goalie number, the second is the
goalie position (always the letter G) and the third is the goalie name. I
have a second range that is a database of all goalies that have ever appeared
in the first list. It is also 3 columns. Essentially if in the first range
(FormattedGoalies) there is a new goalie that has never been seen before i
want it to add to the bottom of the second range called TeamPageGoalies.
There are always 2 goalies in FormattedGoalies, but these goalies change.
Goalie positions is simply set as the second column in GoaliesFormatted.
Thats how i find the next empty row in TeamPageGoalies by counting the number
of letters "G" in TeamPageGoalies then moving 2 down.
For Each Item In FormattedGoalies 'go's through each goalie in formatted
If Not TeamPageGoalies.Find(Item) Is Nothing Then 'adds the goalie to
teampage if he's not found
GoaliesRegistered = fxn.CountA(GoaliePositions) 'counts number of goalies on
teampage
For x = 0 To 2 'moves down the teampagegoalies range to add a new goalie,
then moves accross to add different info
TeamPageGoalies.Offset(0, x).Cells(2 + GoaliesRegistered) = Item.Offset(0, x)
Next x
End If
Next Item
Why won't this work? When i run it it often adds goalies to TeamPagePlayers
that are already on the list so i get multiple entries for the same person.
other times i Dont.