Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding from a range
I am using Excel 97.
I have a range which is named "status" When the criteria is matched below I am wanting to place it in different places on a spreadsheet, but it doesn't always work particularly when there are similiarities in the team name. For example: If team = Range("Status").Find("Mansfield Town 2002") Then 'do something End if If team = Range("Status").Find("Mansfield Town 2003") Then 'do something End if If team = Range("Status").Find("Mansfield Town") Then 'do something End if Can anyone offer me some code which is a more reliable way of picking up the correct team? Thanks -- Mark A Whitehead |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding from a range
If team = Range("Status").Find("Mansfield Town 2002", Lookat:=xlWhole) Then
See if that narrows it down. Or try Application.WorksheetFunction.Match Mike F "Mark" wrote in message ... I am using Excel 97. I have a range which is named "status" When the criteria is matched below I am wanting to place it in different places on a spreadsheet, but it doesn't always work particularly when there are similiarities in the team name. For example: If team = Range("Status").Find("Mansfield Town 2002") Then 'do something End if If team = Range("Status").Find("Mansfield Town 2003") Then 'do something End if If team = Range("Status").Find("Mansfield Town") Then 'do something End if Can anyone offer me some code which is a more reliable way of picking up the correct team? Thanks -- Mark A Whitehead |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding the corresponding value in a range? | Excel Worksheet Functions | |||
finding a value between a range | Excel Worksheet Functions | |||
Finding a value associated with a range | Excel Worksheet Functions | |||
finding name within range | Excel Worksheet Functions | |||
finding if name within range | Excel Worksheet Functions |