无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

vba篩選數(shù)據(jù)

2023-03-15 12:36 作者:Licthe  | 我要投稿


Sub 篩選全部數(shù)據(jù)()

Dim dic As Object

Dim arr()

Dim wb As Workbook


Application.ScreenUpdating = False

Application.DisplayAlerts = False



'激活TB表

? ? For Each wb In Workbooks

? ? ? ? s = wb.Name Like "*科目明細賬&TB表*.xls*"

? ? ? ? If s = True Then

? ? ? ? ? ? wb.Activate

? ? ? ? End If

? ? Next


'篩選區(qū)域寫入數(shù)組


Set dic = CreateObject("scripting.dictionary")

arr = Range("e12").CurrentRegion




'激活新表格

? ? For Each wb In Workbooks

? ? ? ? s = wb.Name Like "*對賬*.xls*"

? ? If s = True Then

? ? ? ? wb.Activate

? ? End If

? ? Next

? ??

? ??

'清除數(shù)據(jù)

x = ActiveSheet.Range("a6").End(xlDown).Row

ActiveSheet.Range("a6:aa" & x).Clear

ActiveSheet.Range("5:5").AutoFilter



'寫入表格

n = 6

? ? For i = 1 To UBound(arr, 1)

? ??

? ??

? ? ? ? If arr(i, 18) = ActiveSheet.Name Then '輸入條件1,條件2,先找到所在的行

? ? ? ??

? ? ? ? ? ? For j = 1 To UBound(arr, 2)

? ? ? ? ? ??

? ? ? ? ? ? ? ? ActiveSheet.Cells(n, j) = arr(i, j) '再把所有列的信息一并粘貼再新表格里

? ? ? ? ? ??

? ? ? ? ? ? Next j

? ? ? ? ? ??

? ? ? ? ? ? n = n + 1

? ? ? ? End If

? ? Next i





Application.ScreenUpdating = True

Application.DisplayAlerts = True


End Sub


vba篩選數(shù)據(jù)的評論 (共 條)

分享到微博請遵守國家法律
南平市| 上栗县| 阿巴嘎旗| 仙游县| 承德市| 长海县| 柳林县| 南靖县| 大竹县| 平江县| 南丰县| 常宁市| 康平县| 凤翔县| 淮阳县| 泰来县| 岗巴县| 大田县| 定西市| 德阳市| 浦江县| 黄大仙区| 庆城县| 社会| 沈丘县| 师宗县| 张家界市| 郁南县| 湘阴县| 西林县| 上饶县| 灵丘县| 疏附县| 北辰区| 杂多县| 合川市| 江永县| 岚皋县| 监利县| 壶关县| 石门县|