| 
    
     |  | 基礎勉強中 さん、おはようございます。 
 Rangeに関する部分だけ。
 >コンパイルエラーが出ます。どうかアドバイスをお願いします。
 
 >  Range(Cells(A2, A20), Cells((0 + i), 2), ((2 + i)), 20)).Select  →ここでコンパイルエラー
 CellsやRangeの引数の数があっていませんね。
 
 また、Cellsの引数はCells(行,列)です。
 
 離れた範囲を選択したい場合は、
 Application.Union(一つめの範囲,二つ目の範囲,・・・)を使用します。
 
 Application.Union(Range("A2:A20"), Range(Cells(2, i), Cells(20, i + 2))).Select
 
 Application.Union(Range(Cells(2, 1), Cells(20, 1)), Range(Cells(2, i), Cells(20, i + 2))).Select
 
 Application.Union(Range(Cells(2, "A"), Cells(20, "A")), Range(Cells(2, i), Cells(20, i + 2))).Select
 
 こんな感じです。
 CellsやUnionの詳細はヘルプで見てくださいね。
 
 |  |