Excel

Sctipt - slide

Sctipt - slide #

What is it? #

Useful functions for handling slide.


jpg export #

Exports selected slides as JPG files.

Sub jpgExport()

    Dim pptPres As Presentation
    Dim filePath As String
    Dim slidenum As String
    Dim slicePageNum() As String
    Dim pagenum As Integer
    Dim i As Integer

    On Error GoTo Err_Check

    Set pptPres = ActivePresentation
    
    If pptPres.Path = "" Then
        MsgBox "프레젠테이션이 파일로 저장되지 않았습니다. 저장 후 다시 시도하세요.", vbExclamation
        Exit Sub
    Else
        filePath = pptPres.Path
    End If

    slidenum = InputBox("Input PageNumber")
    
    If InStr(slidenum, ",") Then
        slicePageNum = Split(Replace(slidenum, " ", ""), ",")
        For i = LBound(slicePageNum) To UBound(slicePageNum)
            On Error Resume Next
            pagenum = CInt(slicePageNum(i))
            If IsNumeric(pagenum) And pagenum <= pptPres.Slides.Count Then
                With pptPres.Slides(pagenum)
                    .Export filePath & "\Slide" & pagenum & ".jpg", "JPG"
                End With
            Else
                MsgBox "non-numeric value or wrong page number: " & slicePageNum(i), vbExclamation
            End If
            On Error GoTo Err_Check
        Next i
    Else        
        pagenum = CInt(slidenum)
        If IsNumeric(pagenum) And pagenum <= pptPres.Slides.Count Then
            With pptPres.Slides(pagenum)
                .Export filePath & "\Slide" & pagenum & ".jpg", "JPG"
            End With
        Else
            MsgBox "non-numeric value or wrong page number", vbExclamation
            Exit Sub
        End If
    End If

    MsgBox "export complete"
Exit Sub

Err_Check:
    MsgBox "오류번호: " & Err.Number & vbCr & "오류내용: " & Err.Description, vbCritical, "오류 발생"
    Exit Sub

End Sub

slide_resizes #

Changes slide size based on pixel dimensions.

Script - Data Util

Script - Data Util #

Calculation #

growthRate #

growthRate
Calculate the growth rate.


achievementRate #

achievementRate
Calculate the achievement rate.


CAGR #

CAGR
Calculate the CAGR.


WordFill #

WordFill
If there is a value in the right side of the selected reference column, fill the cell value in a DB format.


allDecimals #

allDecimals
In the case of numbers with decimal points, all decimal points come out.

Sctipt - shape

Sctipt - shape #

What is it? #

Useful functions for handling shape.


align_bottom #

Aligns selected shape(s) to the bottom of the first selected shape.


align_right #

Aligns selected shape(s) to the right of the first selected shape.


guidebox #

Creates guide boxes (rectangles) spaced at regular intervals.


Script - Sheet Visibility

Script - Sheet Visibility #

sheetVisibleOrNot #

sheetVisibleOrNot
Display visibility property table for all sheets in the current workbook.
→ recommended to work on a new sheet


controlVisibility #

controlVisibility
Apply value for the changed visibility property.


sheetNow #

sheetNow
Simply check with the message box to see if there is a hidden sheet in the current sheet.


toFirstSheet #

tofirstsheet
Go to the first sheet.