0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ExcelVBA メモ

Last updated at Posted at 2025-04-06

セル値・配列の一括入力・出力

出力
https://daitaideit.com/vba-array-resize/

入力

Dim aryTmp As Variant
Dim ary1 As Variant
Dim lastRow As Long

lastRow = ws01Input.Cells(Rows.Count, 1).End(xlUp).Row
aryTmp = ws01Input.Range(ws01Input.Cells(2, 1), ws01Input.Cells(lastRow, 1)).Value  
    
'2次元配列→1次元配列へ変換  
'...aryTmp(1,1) , aryTmp(2,1) のように2次元配列として入ってしまうので
'   transposeで1次元配列 aryInType(1), aryInType(2)に置き換えする
'
 ary1 = WorksheetFunction.Transpose(aryTmp)
    
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?