I want copi continius by criteria in col FGH
then i use loop col on by one after F then G and H
Screenshot_74.png
if col "FGH" = 1 then run copi to J3 then after criteria F then to G copi J13 then
with one code bellow what must i do
Sub Copikan()
Dim CR, Col As String: CR = "FGH"
Dim R, RngSimpan As Range
For Each R In Range("A3:E9")
For i = 1 To 3
Col = Mid(CR, 1, i)
If Range(Col & R.Row) > 0 Then
If RngSimpan Is Nothing Then
Set RngSimpan = Range(Cells(R.Row, 1), Cells(R.Row, 5))
Else
Set RngSimpan = Union(RngSimpan, Range(Cells(R.Row, 1), Cells(R.Row, 5)))
End If
If Not RngSimpan Is Nothing Then
RngSimpan.Copy Range("J3")
End If
End If
Next
Next
End Sub
Bookmarks