I have tons of data, this is why im trying to do this formula, or else id do it manually with the formula I have. Basically I need to match data in Plan 2. So it would take column K5, and column in plan1, E5 (any in E5) and if it doesnt match it would, skip that cell and go down until the match data is found. Once its found it would copy cells I, N, O, P Q.
***I could do with this, but if anyone can help me adjust, but I would like if possible, is some direciton if I wanted it to look at Plan 2 K5 AND, plan 2 J5 (but J5 it needs only to contain) and K5 will match. Then it would go to Plan 1 and look in rows E Going down for anything that matches plan2K5 and matches anything from plan2J5 in rows D. Then copy the cells, Once its found it would copy cells I, N, O, P Q.
**if this is to extreme id be happy with some help with the first one.
I have tried about 5 different programs, this one seems to be the closest, the other one I did is a loop, but it just loops every other cell, doesnt help much, but Ive saved it in the excel sheet. Heres the one i think can work: Im going to keep messing with the formulas, but any direction, thanks!!
Dim x As String
Dim lastrow As Long
Dim y As String
Dim icell As Range
Worksheets("plan2").Select
x = Range("k5").Select
Worksheets("plan1").Select
lastrow = Sheets("Plan1").Range("E" & Rows.Count).End(xlUp).Row
x = "Tanque"
For Each icell In Sheets("Plan1").Range("E1", "E" & lastrow)
If InStr(1, icell, x, vbTextCompare) Then
icell.Offset(0, 9).Copy 'IM TRYING TO COPY COLUMN N, OFFSET 9, I need to copy
'more, I, N, O, P, & Q
Sheets("plan2").Range("E65636").End(xlUp).Offset(0, -4).PasteSpecial xlPasteAll
End If
Next icell
Sheets("plan1").Range("0,9").Copy ' I need it to paste in plan 2, in column AE6,
Sheets("plan2").Range("ae5").PasteSpecial xlPasteColumnWidths
Sheets("Plan2").Range("A:B").EntireColumn.Hidden = True
Application.CutCopyMode = False
End Sub
Bookmarks