eyriquezahrul
Technical User
Hi, does anyone know how to loop each cell in a given range in Excel through Attachmate macro? Thank you.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub rExtract()
Dim rNCell, rNCol, rNRng As Range
Set rNRng = Sheets("RCreation Template").Rows("1:500")
Set rNCol = Sheets("RCreation Template").Columns("A:HH")
Sheets.Add.Name = "rName"
For Each rNCol In rNRng.Rows
For Each rNCell In rNCol.Columns
If rNCell.Value = "Operation" Then
rNCell.Offset(-2, 0).Copy
Sheets("rName").Select
If IsEmpty(ActiveCell) Then
Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Else
Range("A65536").End(xlUp).Offset(1, 0).Select
ActiveCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
End If
Next rNCell
Next rNCol
End Sub