ASABDELHALIM
New Member
Hi
Need your help for this code :
>>> use code - tags <<<
Attched file have 2 coulmns so if B cell in sheet1 is not null then copy B cell and A cell in fornt of it in sheet2
Kindly your help
Thank You
Need your help for this code :
>>> use code - tags <<<
Code:
Sub Copy()
Dim i As Integer
'Dim j As Integer
j = Worksheets("sheet1").Columns("B").Find("*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows, LookIn:=xlValues).Row
For i = 2 To j
If Cells(i, 2) = "" Or Cells(i, 2) = 0 Then
Sheet1.Range("A1").End(xlDown).Offset(1, 0).Value = Sheet2.Range("A" & i).Value
Sheet1.Range("B1").End(xlDown).Offset(1, 0).Value = Sheet2.Range("B" & i).Value
End If
Next i
End Sub
Attched file have 2 coulmns so if B cell in sheet1 is not null then copy B cell and A cell in fornt of it in sheet2
Kindly your help
Thank You
Attachments
Last edited by a moderator: