Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Looking for matches

If you are always searching column A for the first match and column
for the seconds, use:


Code
-------------------
Sub FindMatch()

Dim r As Range
Dim iMax As Long
Dim strReturn As String

iMax = Range("A65536").End(xlUp).Row

For Each r In Range("A1:A" & iMax)
If r.Value = "First Search Criteria" Then
If Cells(r.Row, 7).Value = "Second Search Criterea" Then
strReturn = Cells(r.Row, 10).Value 'Assumes last column is column 10
End If
End If
Next

MsgBox "Found: " & strReturn

End Su
-------------------

There's a lot of assumptions, repost to clarify if this doesn't work.

K

Note: Untested

--
Message posted from http://www.ExcelForum.com

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
Multiple Matches Ron St Jean Excel Discussion (Misc queries) 5 November 13th 08 10:31 PM
Finding matches ( GARY Excel Discussion (Misc queries) 1 October 9th 07 02:35 PM
Multiple Matches Carl Excel Worksheet Functions 3 October 3rd 06 02:41 PM
matches LBTeacher Excel Discussion (Misc queries) 3 November 12th 05 03:51 AM
matches Ray Newman via OfficeKB.com Excel Discussion (Misc queries) 3 February 7th 05 11:09 PM


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

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

About Us

"It's about Microsoft Excel"