VBA Excel Search Select Paste Delete
Solved/Closed
Clint16
Posts
2
Registration date
Monday November 2, 2009
Status
Member
Last seen
November 4, 2009
-
Nov 3, 2009 at 04:00 AM
Clint16 Posts 2 Registration date Monday November 2, 2009 Status Member Last seen November 4, 2009 - Nov 4, 2009 at 07:07 AM
Clint16 Posts 2 Registration date Monday November 2, 2009 Status Member Last seen November 4, 2009 - Nov 4, 2009 at 07:07 AM
Related:
- VBA Excel Search Select Paste Delete
- Vba select case like - Guide
- Yahoo search history delete - Guide
- Number to words in excel formula without vba - Guide
- Delete my whatsapp account without app - Guide
- Safe search settings - Guide
1 response
Clint16
Posts
2
Registration date
Monday November 2, 2009
Status
Member
Last seen
November 4, 2009
Nov 4, 2009 at 07:07 AM
Nov 4, 2009 at 07:07 AM
It appears I've got it sorted out:
Sub main()
startrow = Cells(1, 7)
endrow = Cells(2, 7)
col = Cells(3, 7)
col1 = Cells(4, 7)
col2 = Cells(5, 7)
Call FHL(startrow, endrow, col, col1, col2)
End Sub
Sub FHL(row1, row2, col, col1, col2)
wrow = row1
For I = row1 To row2
If Cells(i, col).Value = 0 Then
For j = col1 To col2
Cells(wrow, col + col2 - col1 + 1 + j) = Cells(i, j)
Next j
wrow = wrow + 1
End If
Next
End Sub
Sub main()
startrow = Cells(1, 7)
endrow = Cells(2, 7)
col = Cells(3, 7)
col1 = Cells(4, 7)
col2 = Cells(5, 7)
Call FHL(startrow, endrow, col, col1, col2)
End Sub
Sub FHL(row1, row2, col, col1, col2)
wrow = row1
For I = row1 To row2
If Cells(i, col).Value = 0 Then
For j = col1 To col2
Cells(wrow, col + col2 - col1 + 1 + j) = Cells(i, j)
Next j
wrow = wrow + 1
End If
Next
End Sub