Please follow following steps
1.Right click on the toolbar> click Control Box
2.From the control box that appears on your screen, select a command button
and draw it to your sheet
3.Double click the command button and write following codes in code window
Private Sub CommandButton1_Click()
Dim row As Integer, col As Integer
row = 1
col = 1
Dim rowinsheet2 As Integer, colinsheet2 As Integer
rowinsheet2 = 1
colinsheet2 = 1
While Sheet1.Cells(row, col).Value <> ""
If CInt(Sheet1.Cells(row, col + 2).Value) > 0 Then
Sheet2.Cells(rowinsheet2, colinsheet2).Value = Sheet1.Cells
Sheet2.Cells(rowinsheet2, colinsheet2 + 1).Value = Sheet1.
Cells(row, colinsheet2 + 1).Value
Sheet2.Cells(rowinsheet2, colinsheet2 + 2).Value = Sheet1.
Cells(row, colinsheet2 + 2).Value
rowinsheet2 = rowinsheet2 + 1
row = row + 1
Have a nice timeâ€¦.
Convert your Excel spreadsheet into an online calculator.
Message posted via http://www.officekb.com