Excel&VBA/VBA4 VBA) 그룹 자동화 그룹 dim idx_1 as long dim idx_2 as long dim sRow as long dim LastRow as long dim TargetSheet as Worksheet set TargetSheet = Sheets("쉬트명") TargetSheet.Select --처리행 구하기 LastRow = TargetSheet.Range("a65536").End(xlUp).Row Application.ScreenUpdating = False With ActiveSheet.Outline .AutomaticStyles = false .SummaryRow = xlAbove .SummaryColumn = xlRight End With For idx_1 = 2 To LastRow If cells(idx_1.. 2022. 10. 7. VBA) 전각문자 치환 Public Function WideReplace(Source as string) as string Dim iStart as Integer Dim Target as String Dim sTemp as String For iStart = 1 To Len(Source) sTemp = Mid(Source, iStart, 1) '전각을 반각으로 변환 후 합침 Target = Target & StrConv(sTemp, vbNarrow) Next iStart WideReplace = Target End Function 2022. 7. 18. VBA) 데이터 전체 행/열 구하기 Dim sht As Worksheet Set sht = ActiveWorkbook.sheets ("매핑생성") '필터해제 If sht.FilterMode = True Then sht.ShowAllData End If 1) rowcnt = sht.Range("b65536").End(xlUp).Row colcnt = sht.Rnage("A1").End(xlToRight).Column 2) With sht.UsedRange rowcnt = .Rows.Count colcnt = .Columns.Count End With 2021. 4. 6. [VBA] 문자 분리하기(split) dim temp dim i as integer dim icnt as integer temp = "123,456,789" rem 구분자로 배열 수 확인 icnt = UBound(Split(temp,",")) for i = 0 to icnt debug.print Split(temp, ",")(i) next i 2018. 2. 13. 이전 1 다음