2010년 11월 10일 수요일

Excel macro reset height of row selected.

If the row height are too low, to set minimum cell hight the macro could be used.


Sub RowHeightReset()
'
' RowHeightReset() reset height of row selected.
'
For Each r In ActiveWindow.RangeSelection.Rows
rh = r.RowHeight
r.RowHeight = rh + 10

If rh <= 40 Then
r.RowHeight = 41
End If

Next r
End Sub

엑셀의 셀 높이가 너무 작을 때, 셀 높이를 일정하게 키우고,
어느 기준(41 pixel)보다 낮을 경우는 최소 그 값으로 지정하는
매크로입니다. 선택한 열에 대해 적용할 수 있습니다.

2010년 11월 1일 월요일