라벨이 Excel인 게시물 표시

엑셀 VBA 선택 영역 병합, 현재 cell로부터 특정 영역 병합

Sub 선택병합() ' ' 선택병합 매크로 ' 선택된 영역을 병합 ' ' 바로 가기 키: Ctrl+Shift+D '     With Selection         .HorizontalAlignment = xlCenter         .VerticalAlignment = xlCenter         .WrapText = False         .Orientation = 0         .AddIndent = False         .IndentLevel = 0         .ShrinkToFit = False         .ReadingOrder = xlContext         .MergeCells = False     End With     Selection.Merge End Sub Sub 셀병합_2비트() ' ' 셀병합_2비트 매크로 ' 현 위치부터 +1개 셀을 병합 ' ' 바로 가기 키: Ctrl+a '     startcell = ActiveCell.Address     endcell = ActiveCell.Offset(0, 1).Address          range(startcell & ":" & endcell).Select     Selection.Merge End Sub Sub 셀병합_4비트() ' ' 셀병합_4비트 매크로 ' 현재 셀부터 +3까지의 셀...

엑셀 VBA 특정 cell의 값을 다른 cell에서 prefix로 가지고 있을 때 제거

excel vba while문, for문, if문, instr(문자열 포함 검사), split 예제 Sub 이름떼기()     Dim i As Long     Dim j As Long     Dim k As Long     Dim sfrName As String     Dim fieldName As String     Dim stringTmp() As String             i = 5     Do While IsEmpty(Cells(i, 3).Value) = False         sfrName = Cells(i, 3).Value & "_"                 For j = 0 To 1             For k = 4 To 19                 fieldName = Cells(i + j, k).Value                 If InStr(fieldName, sfrName) Then                     stringTmp = Split(fieldName, sfrName)                     fieldName = stringTmp(1)         ...