Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Need to find a value in a range and take action if its there

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.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search and Find Missing In Action LarryP Excel Programming 5 May 21st 08 10:37 PM
Search a Range take Action Kevin Eames Excel Programming 2 February 18th 07 07:26 PM
where do I find the the action icon in regards to a meeting? kimberleyleigh Excel Worksheet Functions 1 March 23rd 06 09:12 PM
Find a word and then take certain action, else John Grossman Excel Worksheet Functions 1 January 10th 05 05:08 AM
Using text boxes to find value, then do some action gaba Excel Programming 0 October 28th 04 05:21 AM


All times are GMT +1. The time now is 11:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"