最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(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ù)的評論 (共 條)

分享到微博請遵守國家法律
巧家县| 汉川市| 宁明县| 西充县| 龙州县| 大理市| 岐山县| 上饶市| 庆城县| 阿荣旗| 慈溪市| 新化县| 长宁县| 综艺| 平安县| 弋阳县| 吴忠市| 都匀市| 博客| 湘阴县| 壶关县| 徐水县| 中西区| 屏山县| 西乌| 大渡口区| 马关县| 绥宁县| 施甸县| 土默特右旗| 武义县| 高要市| 梨树县| 枞阳县| 麟游县| 荆州市| 临西县| 筠连县| 仙居县| 扶余县| 兴业县|