如果它滿足 NAME 列中的 BANK 條件,我想從 nostra 選項卡中復制“BALANCE”列中的值。這段代碼是否朝著正確的方向發展?
With wbMe.Sheets("nostra")
.AutoFilterMode = False
With .Range("A1:I11")
.AutoFilter Field:=1, Criteria1:="Bank "
.SpecialCells(xlCellTypeVisible).Copy Destination:=wbMe.Sheets("papiery").Range("A5")
End With
uj5u.com熱心網友回復:
復制自動過濾的列
快速修復
With wbMe.Sheets("nostra")
.AutoFilterMode = False
With .Range("A1:I11")
Dim cIndex As Variant
cIndex = Application.Match("BALANCE", .Rows(1), 0)
If IsNumeric(cIndex) Then
.AutoFilter Field:=1, Criteria1:="Bank"
Intersect(.SpecialCells(xlCellTypeVisible), .Columns(cIndex)) _
.Copy Destination:=wbMe.Sheets("papiery").Range("A5")
End If
End With
.AutoFilterMode = False
End With
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/408248.html
標籤:
