回答編集履歴

1

コード追記

2020/09/02 03:12

投稿

hatena19
hatena19

スコア33755

test CHANGED
@@ -13,3 +13,19 @@
13
13
  key1:=Range("B3"), Order1:=xlAscending, Header:=xlYes
14
14
 
15
15
  ```
16
+
17
+
18
+
19
+ SpecialCells(xlLastCell) だと他に表があるとそれも含まれるので、下記の方がいいかな。
20
+
21
+
22
+
23
+ ```vba
24
+
25
+ Sheets("A").Select
26
+
27
+ Intersect(Range("B3").CurrentRegion, Range("B3:IV65536")).Sort _
28
+
29
+ key1:=Range("B3"), Order1:=xlAscending, Header:=xlYes
30
+
31
+ ```