View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
talonega149 talonega149 is offline
external usenet poster
 
Posts: 6
Default Range to find matches to copy values

On Nov 4, 3:56*pm, "vogtm via OfficeKB.com" <u11518@uwe wrote:
I don't think that your original question was well-worded. Perhaps

Sub test()
Dim LR As Long, i As Long, X As Variant
With Sheets("rd")
* * LR = .Range("N" & Rows.Count).End(xlUp).Row
* * For i = 1 To LR
* * * * With .Range("N" & i)
* * * * * * X = Application.Match(.Value, Sheets("overview").Range("B7:B150"),
0)
* * * * * * If IsNumeric(X) Then .Offset(, 2).Copy Destination:=Sheets
("overview").Cells(X, Columns.Count).End(xlToLeft).Offset(, 1)
* * * * End With
* * Next i
End With
End Sub

talonega149 wrote:
Perhaps


[quoted text clipped - 35 lines]
--
Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/excel-programming/200911/1


Almost. *No errors, but its confirming the name match and then
populating the value in row 12 of the overview sheet. *It appears to
not be populating the value into the correct row which has the
matching name on the overview tab.


--
Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/excel-programming/200911/1


Much better. I am sorry for the wording. I did make the change from
'12' to 'X' as it is the defined variable for the row and populating
on multiple lines is now working. Here is something that is weird.
Everything is off by 6 rows. Results are 6 rows higher on each and
every row than it should be. I do not see where this offset would
exist? Do you?