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: 852
Default Find multiple matches in other sheet column return row data


A Nme occurs only once in sheet Input column A.

A Nme can occur multiple times in the list on sheet Output, need to return the Resize(1, 41) for each Nme back to sheet Input. (Repeated Nme's have different data in their rows)

Some Nme's in Input sheet do not occur on the other sheet.

This code returns the first Nme's resized row back to Nme.(Offfset(,1).

So the revised code should probably return Nme & Resized row to column C of Input.

Thanks,
Howard

Sub Nme_Find()
Dim rngFound As Range
Dim Nme As Range
Dim OneRng As Range

Set OneRng = Sheets("Input").Range("A2:A" & Cells(Rows.Count, "A").End(xlUp).Row)

For Each Nme In OneRng
Set rngFound = Sheets("Output").Range("A:A").Find(What:=Nme, _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)

If Not rngFound Is Nothing Then
rngFound.Offset(, 1).Resize(1, 41).Copy Nme.Offset(, 1)
End If
Next
End Sub
 
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 - columnar sheet with multiple matches - need to return a dawgfan Excel Worksheet Functions 7 October 9th 09 02:09 AM
Need formulas to return multiple data matches JeffC Excel Discussion (Misc queries) 1 August 27th 09 04:03 PM
how do i find multiple matches of one data item in an excel range DivaHouston Excel Discussion (Misc queries) 1 January 7th 08 02:43 PM
Find Data from one sheet that matches Brian Shafer Excel Discussion (Misc queries) 1 October 19th 07 06:58 PM
Vlookup to return the sum of multiple matches AussieExcelUser Excel Discussion (Misc queries) 3 August 1st 06 12:29 AM


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