怎么将满足条件的行置顶

如何将满足条件的行置顶举例说明比较直接:表格A 1 trueB 2 TrueC 3 FalseD 4 TrueF 5 False现在想在表格上

如何将满足条件的行置顶
举例说明比较直接:
表格
A 1 true
B 2 True
C 3 False
D 4 True
F 5 False
现在想在表格上添加一个按钮,按钮事件就是点了以后将第三列等于False的行置顶,变成
C 3 False
F 5 False
A 1 true
B 2 True
D 4 True

[解决办法]

VB code
Sub Button1_Click()Dim i As IntegerFor i = 2 To ActiveSheet.UsedRange.Rows.Count Step 1    If Cells(i, 15).Value = "OPEN-TOP" Then        Rows(i).Select        Cells(i, 1).Activate        Selection.Cut        Range("A1").Activate        Selection.Insert Shift:=xlDown    End IfNextEnd Sub