LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Find a string match in a column

Hi,

I am wanting to find a string from a column which matches my variable. I
modified this code of Tom Ogilvy's in a related answer

For Each cell In rngA
res = Application.Match("*" & cell.Value & "*", rngB, 0)
If Not IsError(res) Then
Set rng = rngB(res)
rng.Offset(0, 1).Value = cell
End If

to

For Each cell In rngA
res = Application.Match(myVar, MyRng)
If Not IsError(res) Then
myCode
End If
next

but I get a number in res that in fact is a blank cell. Can't work out what
is happening. Any help appreciated.
 
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
Vlookup to find a match in a string KCK Excel Worksheet Functions 6 March 16th 09 07:59 PM
How to find last match in a column? [email protected] Excel Discussion (Misc queries) 5 October 12th 08 12:55 PM
Find a string within a column Rookie_User Excel Discussion (Misc queries) 8 March 17th 06 02:12 PM
Find text string in column? Dave Peterson Excel Discussion (Misc queries) 3 August 26th 05 01:22 AM
Trying to find string in a column or row strataguru[_12_] Excel Programming 1 December 24th 03 01:02 AM


All times are GMT +1. The time now is 03:32 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"