Excel vba 전체 행 또는 열의 범위를 가져옵니다

코드 예제

2
0

excel vba 전체 행 또는 열의 범위를 가져옵니다

'To get a contiguous range of entire rows, use this VBA function:

Function WSRows(ws As Worksheet, Row1&, Rows&)
    Set WSRows = ws.Rows(Row1).Resize(Rows)
End Function
  
'-----------------------------------------------------------------
  
MsgBox WSRows(Sheet1, 11, 9).Address		'<--displays: $11:$20
  
'To get the values in the range into a variant array:  
v =  WSRows(Sheet1, 11, 9)
   
'-----------------------------------------------------------------
 
  
'Sister function to a get range of contiguous full columns:  
  
Function WSCols(ws As Worksheet, Col1&, Cols&)
    Set WSCols = ws.Columns(Col1).Resize(, Cols)
End Function

비슷한 페이지

예제가있는 유사한 페이지

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................