Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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
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
Finding the corresponding value in a range? Zuo Excel Worksheet Functions 4 February 25th 10 12:45 PM
finding a value between a range Susan Excel Worksheet Functions 9 March 6th 07 12:07 AM
Finding a value associated with a range Raymond Gallegos Excel Worksheet Functions 5 November 25th 05 08:38 PM
finding name within range sheila Excel Worksheet Functions 4 September 14th 05 07:52 AM
finding if name within range sheila Excel Worksheet Functions 9 September 13th 05 04:24 AM


All times are GMT +1. The time now is 07:07 AM.

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"