Hiya!
I'm a newbie! I have four columns of data:
number1 label1 number2 label2
the label have the same values, but different numbers assigned to them. I am trying to take each sequential number1/label1 combination, paste it into the next row, find the same matching string in label 2, cut and paste number2/label2 in the same row as number1/label1. So the output would be:
number1 label1 number2 label2 (which would be the same as label1).
Basically, I'm trying to match two columns long lists of data.
So far, what I have just returns the same string intstead of going to the next row/string:
Sub Matching4()
'
' Matching4 Macro
'
'
Application.CommandBars("Stop Recording"
.Visible = True
ActiveCell.Offset(26, 0).Range("A1:B1"
.Select
ActiveCell.Offset(26, 1).Range("A1"
.Activate
Selection.Copy
ActiveCell.Offset(-26, -1).Range("A1"
.Select
ActiveSheet.Paste
ActiveCell.Offset(0, 1).Range("A1"
.Select
Application.CutCopyMode = False
Selection.Copy
Cells.Find(What:="ADP-ribosylation factor 2", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False).Activate
Cells.FindNext(After:=ActiveCell).Activate
ActiveCell.Offset(0, -1).Range("A1:B1"
.Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.LargeScroll Down:=-1
Range("C288"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C268"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C248"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C228"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C208"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C188"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C168"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C148"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C128"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C108"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C88"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C68"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C48"
.Select
ActiveWindow.LargeScroll Down:=-1
Range("C18"
.Select
ActiveSheet.Paste
Rows("3:3"
.Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
End Sub
I'm a newbie! I have four columns of data:
number1 label1 number2 label2
the label have the same values, but different numbers assigned to them. I am trying to take each sequential number1/label1 combination, paste it into the next row, find the same matching string in label 2, cut and paste number2/label2 in the same row as number1/label1. So the output would be:
number1 label1 number2 label2 (which would be the same as label1).
Basically, I'm trying to match two columns long lists of data.
So far, what I have just returns the same string intstead of going to the next row/string:
Sub Matching4()
'
' Matching4 Macro
'
'
Application.CommandBars("Stop Recording"

ActiveCell.Offset(26, 0).Range("A1:B1"

ActiveCell.Offset(26, 1).Range("A1"

Selection.Copy
ActiveCell.Offset(-26, -1).Range("A1"

ActiveSheet.Paste
ActiveCell.Offset(0, 1).Range("A1"

Application.CutCopyMode = False
Selection.Copy
Cells.Find(What:="ADP-ribosylation factor 2", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False).Activate
Cells.FindNext(After:=ActiveCell).Activate
ActiveCell.Offset(0, -1).Range("A1:B1"

Application.CutCopyMode = False
Selection.Copy
ActiveWindow.LargeScroll Down:=-1
Range("C288"

ActiveWindow.LargeScroll Down:=-1
Range("C268"

ActiveWindow.LargeScroll Down:=-1
Range("C248"

ActiveWindow.LargeScroll Down:=-1
Range("C228"

ActiveWindow.LargeScroll Down:=-1
Range("C208"

ActiveWindow.LargeScroll Down:=-1
Range("C188"

ActiveWindow.LargeScroll Down:=-1
Range("C168"

ActiveWindow.LargeScroll Down:=-1
Range("C148"

ActiveWindow.LargeScroll Down:=-1
Range("C128"

ActiveWindow.LargeScroll Down:=-1
Range("C108"

ActiveWindow.LargeScroll Down:=-1
Range("C88"

ActiveWindow.LargeScroll Down:=-1
Range("C68"

ActiveWindow.LargeScroll Down:=-1
Range("C48"

ActiveWindow.LargeScroll Down:=-1
Range("C18"

ActiveSheet.Paste
Rows("3:3"

Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
End Sub