Skip to content

Instantly share code, notes, and snippets.

@siguremon
Created December 11, 2013 02:12
Show Gist options
  • Save siguremon/7904114 to your computer and use it in GitHub Desktop.
Save siguremon/7904114 to your computer and use it in GitHub Desktop.
Rangeで取得したデータを常に配列型として扱う ref: http://qiita.com/siguremon/items/eb8b7d234c6391e2a829
Dim lastRow As Long
Dim varData As Variant
' なんらかの方法でlastRowを取得
varData = Worksheets("address").Range("B2:B" & lastRow).Value
If Not IsArray(varData) Then
varData = Array(varData)
End If
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment