행위

엑셀 매크로

DB CAFE

thumb_up 추천메뉴 바로가기


1 엑셀 함수 목록[편집]

https://www.oppadu.com/%ec%97%91%ec%85%80-%ed%95%a8%ec%88%98-%eb%aa%a9%eb%a1%9d/

1.1 SQL의 substring() 함수와 비슷한 함수[편집]

  1. RIGHT"셀 or 문자", 잘라낼 글자 수)
  2. LEFT("셀 or 문자", 잘라낼 글자 수)
  3. MID("셀 or 문자", 시작글자 수,잘라낼 글자 수)

5 초보자용 VBA 사용 방법[편집]

https://ttend.tistory.com/598?category=580297

6 그림(사진) 쉽게 삽입하는 매크로 VBA[편집]

https://ttend.tistory.com/567?category=580297

7 버튼(단추) 양식에 매크로 연결하기[편집]

https://ttend.tistory.com/384?category=580297

8 매크로 보안 경고 없애기 - 신뢰할 수 있는 폴더 추가[편집]

https://ttend.tistory.com/383?category=580297

9 매크로로 복사된 워크시트를 제일 뒤쪽으로 보내기[편집]

https://ttend.tistory.com/382?category=580297

10 매크로 - 시트 자동으로 복사하기[편집]

https://ttend.tistory.com/381?category=580297

11 스핀버튼으로 양식 입력 자동화[편집]

https://ttend.tistory.com/256?category=580297

12 개발도구 추가하기(엑셀 2007, 엑셀 2010)[편집]

https://ttend.tistory.com/255?category=580297

13 워크시트 이름 셀 텍스트로 가져오기[편집]

https://ttend.tistory.com/658?category=580297

14 워크시트 이름을 셀 내용으로 자동으로 바꾸기[편집]

https://ttend.tistory.com/657?category=580297

15 열 너비와 행 높이 다른 시트에 적용하기[편집]

https://ttend.tistory.com/599?category=580297

16 모든 시트에 적용 하기[편집]

Sub 시트마다_바로가기_컬럼추가()
  
    Dim Count1 As Integer
    Dim i As Integer

    'Set Count1 equal to the number of worksheets in the active workbook.

    Count1 = ActiveWorkbook.Worksheets.Count

    For i = 1 To Count1
    
        Worksheets(i).Activate
        ' 통합 시트는 제외 하기 (실행버튼이 있는 시트)
        If Worksheets(i).Name <> "통합" Then               '// Sheet 파일이름이 Main이 아니면
        ' 적용할 액션을 기술 
            Application.Goto Reference:="R5C11"
            Range(Selection, Selection.End(xlDown)).Select
            Range(Selection, Selection.End(xlToRight)).Select
            Selection.FillDown
        End If
        
    Next i
End Sub

16.1 시트마다 컬럼 추가 하기[편집]

Sub 시트마다_바로가기_컬럼추가()
  
    Dim Count1 As Integer
    Dim i As Integer

    'Set Count1 equal to the number of worksheets in the active workbook.

    Count1 = ActiveWorkbook.Worksheets.Count

    For i = 1 To Count1
    
        Worksheets(i).Activate
        
        If Worksheets(i).Name <> "통합" Then               '// Sheet 파일이름이 Main이 아니면
            ' 적용할 액션을 기술
            Application.Goto Reference:="R5C11"
            Range(Selection, Selection.End(xlDown)).Select
            Range(Selection, Selection.End(xlToRight)).Select
            Selection.FillDown
        End If
        
    Next i
End Sub

16.2 시트별로 행의 갯수가 다른경우 반복 적용 하기[편집]

Sub 검증규칙코드추가()
'
' 검증규칙코드추가 매크로
'

'
    'Columns("E:E").Select
    'Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    'Range("E4").Select
    'ActiveCell.FormulaR1C1 = "검증규칙코드"
    
    'Dim A As Range

    
    ' 최대행의 건수 알기
    rowCnt = Range("a5", Range("a5").End(xlDown)).Rows.Count
    'Set A = Range("A3:B4")
    '열개수 = Range("a1", Range("a1").End(xlToRight)).Columns.Count

    'MsgBox (rowCnt)
    
    
'    Range("a5", "A" & 4 + rowCnt).Select
   
    Range("E5").Select
    ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[1],[검증규칙_목록_20200710_173349.xls]Sheet1!C9:C11,3,0)"

    Range("e5", "e" & 4 + rowCnt).Select
    Selection.FillDown

End Sub


Sub 검증규칙코드_반복실행()
  
    Dim Count1 As Integer
    Dim i As Integer

    'Set Count1 equal to the number of worksheets in the active workbook.

    Count1 = ActiveWorkbook.Worksheets.Count

    For i = 1 To Count1
    
        Worksheets(i).Activate
        ' 적용할 액션을 기술
        
        If Worksheets(i).Name <> "통합" Then               '// Sheet 파일이름이 Main이 아니면
            Call 검증규칙코드추가
        End If

        
    Next i
End Sub

17 각 시트를 별도 파일로 저장하기[편집]

https://ttend.tistory.com/596?category=580297

18 열 데이터에 따라 각각의 시트로 분리하기[편집]

https://ttend.tistory.com/595?category=580297

19 병합한 셀 해제하고 셀 내용 채우기[편집]

https://ttend.tistory.com/593?category=580297

20 같은 내용일 때 셀 병합하기[편집]

https://ttend.tistory.com/592?category=580297

21 셀 안의 영어와 한글, 숫자 분리 추출하는 매크로 VBA[편집]

https://ttend.tistory.com/568?category=580297


22 VBE 코드 창 글꼴 및 글자 크기 변경하기[편집]

https://ttend.tistory.com/529?category=580297

24 텍스트 중 일부 글자만 색깔 바꾸기[편집]

https://ttend.tistory.com/516?category=580297

25 시트 복사 매크로에 버튼 삭제하는 매크로 추가[편집]

https://ttend.tistory.com/385?category=580297

26 각 시트를 PDF로 저장[편집]

https://ttend.tistory.com/651