[037] Excel에서 수정 파일 반복(VBA)
3986 단어 Excel
Sub OpenCloseArray()
Dim MyFile As String
Dim Arr(100) As String
Dim count As Integer
MyFile = Dir("F:\Desktop\98、99 \" & "*.xls") '
count = count + 1
Arr(count) = MyFile
Do While MyFile <> ""
MyFile = Dir
If MyFile = "" Then
Exit Do
End If
count = count + 1
Arr(count) = MyFile '
Loop
For i = 1 To count
Workbooks.Open Filename:="F:\Desktop\98、99 \" & Arr(i) ' Excel
'
Dim allRow As Integer
allRow = Cells(Rows.count, 1).End(xlUp).Row
For j = 2 To allRow
Cells(j, 1) = Cells(j, 1) / 1000
Next
'
ActiveWorkbook.Close savechanges:=True ' ,
Next
End Sub
2010에서 테스트에 문제가 있어서 저장할 수 없지만 2007에서는 가능합니다!
대량 변경이 필요한 내용은 편집 범위 내에 직접 쓰면 됩니다!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Excel Grep toolExcel Grep tool ■히나가타 ■ 시트 구성 ExcelGrep.cls...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.