回答編集履歴

2

修正

2021/09/29 12:46

投稿

jinoji
jinoji

スコア4592

test CHANGED
@@ -8,11 +8,9 @@
8
8
 
9
9
  Sub sample()
10
10
 
11
- Dim ws As Worksheet
11
+ Dim ws As Worksheet, c As Range, arr As Variant
12
12
 
13
13
  Set ws = ActiveSheet
14
-
15
- Dim c As Range, arr As Variant
16
14
 
17
15
  For Each c In Intersect(ws.UsedRange, ws.Columns(1)).Cells
18
16
 

1

追記

2021/09/29 12:46

投稿

jinoji
jinoji

スコア4592

test CHANGED
@@ -1,5 +1,29 @@
1
- ```
1
+ ```Excel
2
2
 
3
3
  =UPPER(LEFT(A1,1)&"・"&MID(A1,FIND(".",A1)+1,1))
4
4
 
5
5
  ```
6
+
7
+ ```VBA
8
+
9
+ Sub sample()
10
+
11
+ Dim ws As Worksheet
12
+
13
+ Set ws = ActiveSheet
14
+
15
+ Dim c As Range, arr As Variant
16
+
17
+ For Each c In Intersect(ws.UsedRange, ws.Columns(1)).Cells
18
+
19
+ arr = Split(StrConv(c.Value, vbUpperCase), ".")
20
+
21
+ c.Offset(, 1).Value = Join(Array(Left(arr(0), 1), Left(arr(1), 1)), "・")
22
+
23
+ Next
24
+
25
+ End Sub
26
+
27
+
28
+
29
+ ```