vba정렬(2)
-
엑셀 VBA 가운데 정렬, 좌측 정렬 예제
1. 상단 맞춤 Range(“A1:B1”).VerticalAlignment = xlTop 2. 가운데 맞춤 Range(“A1:B1”).VerticalAlignment = xlCenter 3. 하단 맞춤 Range(“A1:B1”). VerticalAlignment = xlBottom 1. 좌측 정렬 Range(“A1:B1”).HorizontalAlignment = xlLeft 2. 가운데 정렬 Range(“A1:B1”).HorizontalAlignment = xlCenter 3. 우측 정렬 Range(“A1:B1”).HorizontalAlignment = xlRight
2020.04.13 -
VBA 숫자 정렬, 버블정렬 1탄
소스 Sub GoGo_Bubble() Dim m As Workbook: Dim ms As Worksheet Set m = Workbooks(ThisWorkbook.Name) Set ms = m.Sheets(ActiveSheet.Name) Dim num() As Variant ' //임의 숫자 버블정렬 하기. num() = Array(10, 3, 6, 7, 4, 2, 9, 8, 1) ' //cells에 뿌려보기 For i = 0 To UBound(num) ms.Cells(i + 1, 1) = num(i) Next i ' //Bubble 함수 호출 Call Bubble_Ssun(num()) ' //cells에 뿌려보기 For i = 0 To UBound(num) ms.Cells(i + 1, 2) = num(..
2020.01.08