Vba 那么“基金”的价值呢 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“证书ADR”,则 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“证书”,则 单元
那么“基金”的价值呢 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“证书ADR”,则 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“证书”,则 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“投资基金是股息”,则 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“投资基金应资本化”,则 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“优先购买权”,则 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“抵押证书”,则 单元格(i,“A”).EntireRow.Delete 如果结束 下一行: 接下来我 “这将清除不是今天的日期 Last=单元格(Rows.Count,“L”).End(xlUp).Row 对于i=第2步的最后一步-1 如果单元格(i,“F”).Value=“BE*”则 转到下一行1: 如果结束 如果(单元格(i,“L”).值)<日期,则 单元格(i,“A”).EntireRow.Delete 如果结束 第二行1: 接下来我 Last=单元格(Rows.Count,“L”).End(xlUp).Row 对于i=第2步的最后一步-1 如果单元格(i,“F”).Value=“BE*”则 转到下一行2: 如果结束 如果(单元格(i,“L”).值)>日期,则 单元格(i,“A”).EntireRow.Delete 如果结束 第二行: 接下来我 将您的mid替换为此行中的mid(单元格(i,“F”).Value,instr(1,单元格(i,“F”).Value,“BE”),2)如果(mid(单元格(i,“F”).Value,0,2)“BE”),则将Vba 那么“基金”的价值呢 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“证书ADR”,则 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“证书”,则 单元,vba,excel,Vba,Excel,那么“基金”的价值呢 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“证书ADR”,则 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“证书”,则 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“投资基金是股息”,则 单元格(i,“A”).EntireRow.Delete 如果结束 如果(单元格(i,“H”).值)“投资基金应资本化”,则 单
单元格替换为单元格
Sub Paycheck()
'Delete first two rows
Rows(2).EntireRow.Delete
Rows(1).EntireRow.Delete
' Restore screen updating and events
Application.ScreenUpdating = False
Application.EnableEvents = False
' DELETES ALL ROWS FROM A2 DOWNWARDS WITH THE WORDs IN COLUMN H
' USE THIS TO CLEAR CONTENTS BUT NOT DELETE ROW "Cells(i, "A").EntireRow.ClearContents"
Last = Cells(Rows.Count, "H").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "H").Value) <> "SHARES" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Shares limited Partnership" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Shares Fractions" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Funds" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Certificates ADR" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Certificates" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Investment funds BE dividend" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Investment funds BE capitalization" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Pre-emptive right" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Mortgage certificates" Then
Cells(i, "A").EntireRow.Delete
End If
' Deleting other than BE
If (Mid(cell(i, "F").Value, 0, 2) <> "BE") Then
Cells(i, "A").EntireRow.Delete
End If
Next i
' This will clear dates which are not today
Last = Cells(Rows.Count, "L").End(xlUp).Row
For i = Last To 2 Step -1
If (Cells(i, "L").Value) < Date Then
Cells(i, "A").EntireRow.Delete
End If
Next i
Last = Cells(Rows.Count, "L").End(xlUp).Row
For i = Last To 2 Step -1
If (Cells(i, "L").Value) > Date Then
Cells(i, "A").EntireRow.Delete
End If
Next i
'Order the table ascending
Selection.AutoFilter
ActiveWorkbook.Worksheets("Events").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Events").AutoFilter.Sort.SortFields.Add Key:=Range _
("F:F"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Events").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Selection.AutoFilter
End Sub
Dim ws As Worksheet
Dim rng As Range
Dim lastRow As Long
Set ws = ActiveWorkbook.Sheets("Events")
lastRow = ws.Range("F" & ws.Rows.Count).End(xlUp).Row
Set rng = ws.Range("F1:F" & lastRow)
' filter and delete all but header row
With rng
.AutoFilter Field:=1, Criteria1:="<>*BE*"
.Offset(1, 0).SpecialCells(xlCellTypeVisible).EntireRow.Delete
End With
' turn off the filters
ws.AutoFilterMode = False
Last = Cells(Rows.Count, "H").End(xlUp).Row
For i = Last To 1 Step -1
' If Column F values starts with BE then skip the row
If Cells(i, "F").Value = "BE*" Then
GoTo nextline:
End If
If (Cells(i, "H").Value) <> "SHARES" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Shares limited Partnership" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Shares Fractions" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Funds" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Certificates ADR" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Certificates" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Investment funds BE dividend" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Investment funds BE capitalization" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Pre-emptive right" Then
Cells(i, "A").EntireRow.Delete
End If
If (Cells(i, "H").Value) <> "Mortgage certificates" Then
Cells(i, "A").EntireRow.Delete
End If
nextline:
Next i
' This will clear dates which are not today
Last = Cells(Rows.Count, "L").End(xlUp).Row
For i = Last To 2 Step -1
If Cells(i, "F").Value = "BE*" Then
GoTo nextline1:
End If
If (Cells(i, "L").Value) < Date Then
Cells(i, "A").EntireRow.Delete
End If
nextline1:
Next i
Last = Cells(Rows.Count, "L").End(xlUp).Row
For i = Last To 2 Step -1
If Cells(i, "F").Value = "BE*" Then
GoTo nextline2:
End If
If (Cells(i, "L").Value) > Date Then
Cells(i, "A").EntireRow.Delete
End If
nextline2:
Next i