Getting specific cell from one sheet to paste in another sheet?

R

Rozb

Hi All

1. A value on sheet 1 in Row "A" (Row A2:A156) needs to be matched to a "=" value on sheet 2 in Row "A" (Row A2:A6), and then Cells (J & x : AH & x) need to be copied from sheet 2 and pasted in sheet 1 row of the value matched Cells (J & x : AH & x)


Sub GetSelectAttruMatch(
Application.ScreenUpdating = Fals
mysf = "sheet1
myst = "sheet2
myvalsf = Sheets(mysf).Range("a2").Offset(myrow - 1, mycol - 1).Valu
myvalst = Sheets(myst.Range)("a2:a6").valu
x =
For myrow = 2 To 156 Step
For mycol = 10 To 34 Step
If myvalsf = myvalst The
Sheets(myst).Range("j" & x:"ah" & x).Value = Sheets(mysf).Range("a1").Offset(myrow -1, mycol - 1).Valu
Sheets(mysf).Range("a1").Offset(myrow, mycol).cop
Sheets(myst).Range("j" & x:"ah" & x).past
End I
x= x+
Next myco
Next myro

or
For Each cell or rowIn Worksheets("sheet1").Range("A2:A156"
If cell or row.Value = cell or row.value Then ActiveSheet.Cells(10:34, cell.Column).Cop
Worksheets("sheet1").Range("j" & x).Cells(cell.Row, cell.Column 10:34).Selec
Next cell or ro
Application.ScreenUpdating = Tru
Application.CutCopyMode = Fals
End Su

Thanks

Rozb Still "Lost and Losing Sleep in Everett"
 
Top